Back Midas Rome Roody Rootana
  Midas DAQ System, Page 138 of 155  Not logged in ELOG logo
Entry  04 Jun 2025, Mark Grimes, Bug Report, Memory leak in mhttpd binary RPC code 
Hi,
During an evening of running we noticed that memory usage of mhttpd grew to close to 100Gb.  We think we've traced this to the following issue when making
RPC calls.
    Reply  04 Jun 2025, Konstantin Olchanski, Bug Report, Memory leak in mhttpd binary RPC code 
Noted. I will look at this asap. K.O.

[quote="Mark Grimes"]Hi,
    Reply  07 Jun 2025, Mark Grimes, Bug Report, Memory leak in mhttpd binary RPC code msysmon-mu3ebe-20250601-042124-20250606-122124.png
Hi,

We applied an intermediate fix for this locally and it seems to have fixed our issue.  The attached plot shows the percentage memory use
on our machine with 128 Gb memory, as a rough proxy for mhttpd memory use.  After applying our fix mhttpd seems to be happy using ~7% of the memory
Entry  10 Jun 2025, Nik Berger, Bug Report, History variables with leading spaces 
By accident we had history variables with leading spaces. The history schema check then decides that this is a new variable (the leading space is not read
from the history file) and starts a new file. We found this because the run start became slow due to the many, many history files created. It would be
nice to just get an error if one has a malformed variable name like this.
    Reply  10 Jun 2025, Konstantin Olchanski, Bug Report, Memory leak in mhttpd binary RPC code 
I confirm that MJSON_ARRAYBUFFER does not work correctly for zero-size buffers, 
buffer is leaked in the destructor and copied as NULL in MJsonNode::Copy().
    Reply  15 Jun 2025, Mark Grimes, Bug Report, Memory leak in mhttpd binary RPC code 
Many thanks for the fix.  We've applied and see better memory performance.  We still have to kill and restart 
mhttpd after a few days however.  I think the official fix is missing this part:
Entry  19 Jun 2025, Frederik Wauters, Bug Report, add history variables 
I have encounter this a few times
* Make a new history panel
* Use the web GUI to add history variables
    Reply  19 Jun 2025, Stefan Ritt, Bug Report, History variables with leading spaces 
I added now code to the logger so it properly complains if there would be a leading space in a variable name.

Stefan
    Reply  23 Jun 2025, Stefan Ritt, Bug Report, Memory leak in mhttpd binary RPC code 
Since this memory leak is quite obvious, I pushed the fix to develop.

Stefan
Entry  04 Jul 2025, Mark Grimes, Bug Report, Memory leaks in mhttpd 
Something changed in our system and we started seeing memory leaks in mhttpd again.  I guess someone 
updated some front end or custom page code that interacted with mhttpd differently.
I found a few memory leaks in some (presumably) rarely seen corner cases and we now see steady 
    Reply  21 Jul 2025, Stefan Ritt, Bug Report, Default write cache size for new equipments breaks compatibility with older equipments 
> Perhaps have:

> set_write_cache_size("SYSTEM", 0);
Entry  17 Sep 2025, Mark Grimes, Bug Report, Midas no longer compiles on macOS 
Hi,
The current develop branch no longer compiles on macOS. I get lots of errors of the form
    Reply  17 Sep 2025, Konstantin Olchanski, Bug Report, Midas no longer compiles on macOS 
> The current develop branch no longer compiles on macOS. I get lots of errors of the form
> /Users/me/midas/src/history_schema.cxx:740:4: error: unknown type name 'off64_t' ...
Entry  06 Nov 2025, Konstantin Olchanski, Bug Report, broken scroll on midas web pages 
midas web pages that use overlays (dlgPanel, etc) are currently broken - if 
overlay does not fit in the visible window, it's bottom is truncated and control 
buttons like "create" and "cancel" are not visible, not clickable, page does not 
    Reply  13 Nov 2025, Stefan Ritt, Bug Report, broken scroll on midas web pages 
I confirm the problem is there (at least under MacOSX Safari) and I will take care of it.

Stefan
    Reply  14 Nov 2025, Stefan Ritt, Bug Report, broken scroll on midas web pages 
This problem was introduced by ZS in March 2023 with these commits:

https://bitbucket.org/tmidas/midas/commits/25b13f875ff1f7e2f4e987273c81d6356dd2ff53
Entry  22 Oct 2004, Konstantin Olchanski, Bug Fix, mhttpd message colouring 
I commited a fix to mhttpd logic that decides which messages should be shown in
"red" colour- before, any message with square brackets and colons would be
highlighted in red. Now only messages matching the pattern [...:...] are
Entry  09 Nov 2004, Pierre-Andre Amaudruz, Bug Fix, New transition scheme 
Problem:
If cm_set_transition_sequence() is used for changing the sequence number, the 
command odbedit> start/stop/resume/pause -v report the propre sequence but the
Entry  25 Feb 2005, Konstantin Olchanski, Bug Fix, fixed: double free in FORMAT_MIDAS ybos.c causing lazylogger crashes 
We stumbled upon and fixed a "double free" bug in src/ybos.c causing crashes in
lazylogger writing .mid files in the FORMAT_MIDAS format (why does it use
ybos.c? Pierre says- for generic file i/o). Why this code had ever worked before
Entry  05 May 2005, Konstantin Olchanski, Bug Fix, fix: minor bit rot in the example experiment 
I fixed some minor bit rot in the example experiment: a few minor Makefile
problems, make the analyzer use the current histogram creation macros, etc. I
also added startup and shutdown scripts. These will be documented as we work
ELOG V3.1.4-2e1708b5