14 Jan 2026, Derek Fujimoto, Bug Report, DEBUG messages not showing and related
|
I have an application where I want to (optionally) send my own debugging messages to the midas.log file, but am having some problems with this:
* Messages with type MT_DEBUG don't show up in midas.log or on the messages page (calling cm_msg from python)
* messages.html is missing the DEBUG filter option
* Messages sent to other log files (not midas.log) don't get message banners on the web page. Is this intentional?
So I think either there is a bug, or I need to start MIDAS with some flag to enable debugging. Looking at the source, I don't see why these messages wouldn't get logged.
Any insight would be appreciated! |
14 Jan 2026, Stefan Ritt, Bug Report, DEBUG messages not showing and related
|
MT_DEBUG messages are there for debugging, not logging. They only go into the SYSMSG buffer and NOT to the log file. If you want anything logged, just use MT_INFO.
Not sure if that's missing in the documentation. Anyhow, there are my original ideas (from 1995 ;-) )
MT_ERROR
Error message, to be displayed in red
MT_INFO
Info or status message
MT_DEBUG
Only sent to SYSMSG buffer, not to midas.log file. Handy if you produce lots of message and don't want to flood the message file. Plus it does not change the timing of your app, since the SYSMSG buffer is much faster than writing
to a file.
MT_USER
Message generated interactively by a user, like in the chat window or via the odbedit "msg" command
MT_LOG
Messages with are only logged but not put into the SYSMSG buffer
MT_TALK
Messages which should go through the speech synthesis in the browser and are "spoken"
MT_CALL
Message which would be forwarded to the user via a messaging app (historically this was an actual analog telephone call via a modem ;-) )
If that is missing in the documentation, please feel free to copy/paste it to the appropriate place.
Stefan |
14 Jan 2026, Derek Fujimoto, Bug Report, DEBUG messages not showing and related
|
Ok thanks for the quick and clear response!
Derek
> MT_DEBUG messages are there for debugging, not logging. They only go into the SYSMSG buffer and NOT to the log file. If you want anything logged, just use MT_INFO.
>
> Not sure if that's missing in the documentation. Anyhow, there are my original ideas (from 1995 ;-) )
>
> MT_ERROR
> Error message, to be displayed in red
>
> MT_INFO
> Info or status message
>
> MT_DEBUG
> Only sent to SYSMSG buffer, not to midas.log file. Handy if you produce lots of message and don't want to flood the message file. Plus it does not change the timing of your app, since the SYSMSG buffer is much faster than writing
> to a file.
>
> MT_USER
> Message generated interactively by a user, like in the chat window or via the odbedit "msg" command
>
> MT_LOG
> Messages with are only logged but not put into the SYSMSG buffer
>
> MT_TALK
> Messages which should go through the speech synthesis in the browser and are "spoken"
>
> MT_CALL
> Message which would be forwarded to the user via a messaging app (historically this was an actual analog telephone call via a modem ;-) )
>
> If that is missing in the documentation, please feel free to copy/paste it to the appropriate place.
>
>
> Stefan |
05 Feb 2026, Konstantin Olchanski, Bug Report, omnibus bugs from running DarkLight
|
We finished running the DarkLight experiment and I am reporting accumulated bugs that we have run into.
1) history plots on 12 hrs, 24 hrs tend to hang with "page not responsive". most plots have 16-20 variables,
which are recorded at 1/sec interval. (yes, we must see all the variables at the same time and yes, we want to
record them with fine granularity).
2) starting runs gets into a funny mode if a GEM frontend aborts (hardware problems), transition page reports
"wwrrr, timeout 0", and stays stuck forever, "cancel transition" does nothing. observe it goes from "w"
(waiting) to "r" (RPC running) without a "c" (connecting...) and timeout should never be zero (120 sec in
ODB).
3) ODB editor clicking on hex number versus decimal number no longer allows editing in hex, Stefan implemented
this useful feature and it worked for a while, but now seems broken.
4) ODB editor "right click" to "delete" or "rename" key does not work, the right-click menu disappears
immediately before I can use it (dl-server-2), click on item (it is now blue), right-click menu disappears
before I can use it (daq17). it looks like a timing or race condition.
5) ODB editor "create link" link target name is limited to 32 bytes, links cannot be created (dl-server-2), ok
on daq17 with current MIDAS.
6) MIDAS on dl-server-2 is "installed" in such a way that there is no connection to the git repository, no way
to tell what git checkout it corresponds to. Help page just says "branch master", git-revision.h is empty. We
should discourage such use of MIDAS and promote our "normal way" where for all MIDAS binary programs we know
what source code and what git commit was used to build them.
6a) MIDAS on dl-server-2 had a pretty much non-functional history display, I reported it here, Stefan provided
a fix, I manually retrofitted it into dl-server-2 MIDAS and we were able to run the experiment. (good)
6b) bug (5) suggests that there is more bugs being introduced and fixed without any notice to other midas
users (via this forum or via the bitbucket bug tracker).
K.O. |
06 Feb 2026, Stefan Ritt, Bug Report, omnibus bugs from running DarkLight
|
Thanks for the detailed report. Let me reply one-by-one.
> 1) history plots on 12 hrs, 24 hrs tend to hang with "page not responsive". most plots have 16-20 variables,
> which are recorded at 1/sec interval. (yes, we must see all the variables at the same time and yes, we want to
> record them with fine granularity).
Attached is a similar plot. 8 values recorded every second, displayed for 24h. The backend is actually a Raspberry Pi! I see no issues there. Do you have
the current history version which does the re-binning? Actually the plot below is still without rebinding (see the "1" at the top right), and it contains ~72000 points x 8. The browser does not have any issue
with it.
Stefan |
06 Feb 2026, Stefan Ritt, Bug Report, omnibus bugs from running DarkLight
|
> 3) ODB editor clicking on hex number versus decimal number no longer allows editing in hex, Stefan implemented
> this useful feature and it worked for a while, but now seems broken.
I cannot confirm. See below. There was some issue some time ago, but that's fixed since a while. Please pull on develop and try again.
Here is the change: https://bitbucket.org/tmidas/midas/commits/882974260876529c43811c63a16b4a32395d416a
Stefan |
06 Feb 2026, Stefan Ritt, Bug Report, omnibus bugs from running DarkLight
|
> 4) ODB editor "right click" to "delete" or "rename" key does not work, the right-click menu disappears
> immediately before I can use it (dl-server-2), click on item (it is now blue), right-click menu disappears
> before I can use it (daq17). it looks like a timing or race condition.
Confirmed and fixed: https://bitbucket.org/tmidas/midas/commits/4ba30761683ac9aa558471d2d2d35ce05e72096a
/Stefan |
06 Feb 2026, Stefan Ritt, Bug Report, omnibus bugs from running DarkLight
|
> 5) ODB editor "create link" link target name is limited to 32 bytes, links cannot be created (dl-server-2), ok
> on daq17 with current MIDAS.
Works for me with the current version.
> 6) MIDAS on dl-server-2 is "installed" in such a way that there is no connection to the git repository, no way
> to tell what git checkout it corresponds to. Help page just says "branch master", git-revision.h is empty. We
> should discourage such use of MIDAS and promote our "normal way" where for all MIDAS binary programs we know
> what source code and what git commit was used to build them.
Not sure if you have seen it. I make a "install" script to clone, compile and install midas. Some people use this already. Maybe give it a shot. Might need
adjustment for different systems, I certainly haven't covered all corner cases. But on a RaspberryPi it's then just one command to install midas, modify
the environment, install mhttpd as a service and load the ODB defaults. I know that some people want it "their way" and that's ok, but for the novice user
that might be a good starting point. It's documented here: https://daq00.triumf.ca/MidasWiki/index.php/Install_Script
The install script is plain shell, so should be easy to be understandable.
> 6a) MIDAS on dl-server-2 had a pretty much non-functional history display, I reported it here, Stefan provided
> a fix, I manually retrofitted it into dl-server-2 MIDAS and we were able to run the experiment. (good)
>
> 6b) bug (5) suggests that there is more bugs being introduced and fixed without any notice to other midas
> users (via this forum or via the bitbucket bug tracker).
If I would notify everybody about a new bug I introduced, I would know that it's a bug and I would not introduce it ;-)
For all the fixes I encourage people to check the commit log. Doing an elog entry for every bug fix would be considered spam by many people because
that can be many emails per week. The commit log is here: https://bitbucket.org/tmidas/midas/commits/branch/develop
If somebody volunteers to consolidate all commits and make a monthly digest to be posted here, I'm all in favor, but I'm not that individual.
Stefan |
12 Feb 2026, Stefan Ritt, Bug Report, omnibus bugs from running DarkLight
|
Now I had a similar case that the browser froze when showing 24h of data. Tuned out that 80k points are a bit much. I changed the code so that it starts binning when showing 8h or more. This is not a perfect solution. The code should check at which interval data is written, then
automatically start binning when approaching 4000 points or more. That would however require more complicated code, so I leave it as it is right now. Feedback welcome.
Stefan |
23 Apr 2026, Pavel Murat, Bug Report, increasing the max number of hot links in ODB
|
Dear MIDAS experts,
when I attempted to increase the max number of hotlinks in ODB , defined as
#define MAX_OPEN_RECORDS 256 /**< number of open DB records */
I started running into an assertion in midas/src/odb.cxx
https://bitbucket.org/tmidas/midas/src/fa5457b5274a6b42c5ed8b6dea5e3cdd43de38fe/src/odb.cxx#lines-1525 :
assert(sizeof(DATABASE_CLIENT) == 2112);
is it possible that the size of the DATABASE_CLIENT structure should be checked against 64+sizeof(OPEN_RECORD)*MAX_OPEN_RECORDS ?
- 64 clearly can be expressed in a better maintainable form
UPDATE: similar consideration holds for the size of the DATABLE_HEADER structure, which is also checked against a constant
https://bitbucket.org/tmidas/midas/src/fa5457b5274a6b42c5ed8b6dea5e3cdd43de38fe/src/odb.cxx#lines-1526
-- many thanks, regards, Pavel
|
23 Apr 2026, Nick Hastings, Bug Report, increasing the max number of hot links in ODB 
|
> Dear MIDAS experts,
>
> when I attempted to increase the max number of hotlinks in ODB , defined as
>
> #define MAX_OPEN_RECORDS 256 /**< number of open DB records */
>
> I started running into an assertion in midas/src/odb.cxx
>
> https://bitbucket.org/tmidas/midas/src/fa5457b5274a6b42c5ed8b6dea5e3cdd43de38fe/src/odb.cxx#lines-1525 :
>
> assert(sizeof(DATABASE_CLIENT) == 2112);
>
> is it possible that the size of the DATABASE_CLIENT structure should be checked against 64+sizeof(OPEN_RECORD)*MAX_OPEN_RECORDS ?
> - 64 clearly can be expressed in a better maintainable form
Yes, this assert needs to be updated if you increase MAX_OPEN_RECORDS. See
https://daq00.triumf.ca/MidasWiki/index.php/FAQ#Increasing_Number_of_Hot-links
> UPDATE: similar consideration holds for the size of the DATABLE_HEADER structure, which is also checked against a constant
>
> https://bitbucket.org/tmidas/midas/src/fa5457b5274a6b42c5ed8b6dea5e3cdd43de38fe/src/odb.cxx#lines-1526
Yes DATABASE_HEADER can also be updated, but the associated assert()s need to be updated too.
FYI I have done both of these things and have attached patches.
Cheers,
Nick. |
24 Apr 2026, Konstantin Olchanski, Bug Report, increasing the max number of hot links in ODB
|
> when I attempted to increase the max number of hotlinks in ODB , defined as
> #define MAX_OPEN_RECORDS 256 /**< number of open DB records */
> assert(sizeof(DATABASE_CLIENT) == 2112);
Yes, it is intended to work like this. If you change MAX_OPEN_RECORDS (and some settings),
you break binary compatibility with standard MIDAS and the asserts inform you about it.
It is not a light step to take - you have to recompile all MIDAS clients, and if you miss
one and run it against your non-standard MIDAS, kaboom everything will go,
there is no safety net against this.
In the ALPHA experiment at CERN, for years we have been running with MAX_OPEN_RECORDS set to 2560,
and it works, you have to change both MAX_OPEN_RECORDS in midas.h and the expected values
in the assert() statements.
The new correct values you do not need to guess or compute yourself, the code to print
them is right there and it is easy to enable.
Replacing the numeric constants with computed values of course would completely defeat
the purpose of the tests - to catch the situation where by mistake or by ignorance
(or by miscompilation) sizes of critical data structures become different from those
normally expected.
K.O. |
25 Apr 2026, Pavel Murat, Bug Report, increasing the max number of hot links in ODB
|
I see - thank you for the explanation!
Indeed, updating MIDAS clients on each and every RPI etc in a running experiment may be a real challenge.
Thinking forward - would it help if the ODB clients, upon initial connection but before doing anything else
were reading the ODB parameters from the ODB itself, so the clients were "learning" about the ODB structure
dynamically, at run time? Or that knowledge has to be static ?
-- thanks, regards, Pavel |
26 Apr 2026, Stefan Ritt, Bug Report, increasing the max number of hot links in ODB
|
I wonder why one needs more than 256 hotlinks at all. Please note that with the odbxx "watch" API, you can hotline a whole subdirectory, and get notified if ANY of the
underlying values or subdirectories change. In principle, one could have one hotlink to "/" and see all changes in the ODB (although that does not make sense and might slow
down ODB access a bit).
Try the odbxx_test.cpp example in MIDAS. In line 210 it puts a single hotlink to /Experiment. If you change anything under /Experiment, the program gets notified. By checking the
path of the changed ODB entry, it can figure out which of the subways have been changed:
// watch ODB key for any change with lambda function
midas::odb ow("/Experiment");
ow.watch([](midas::odb &o) {
std::cout << "Value of key \"" + o.get_full_path() + "\" changed to " << o << std::endl;
});
Maybe that would solve your problem without having to change the maximum number of hotlinks.
Stefan |
27 Apr 2026, Konstantin Olchanski, Bug Report, increasing the max number of hot links in ODB
|
> Indeed, updating MIDAS clients on each and every RPI etc in a running experiment may be a real challenge.
actually, only local clients must be rebuilt, remote clients connecting to the mserver do not care about ODB
internal structure.
> Thinking forward - would it help if the ODB clients, upon initial connection but before doing anything else
> were reading the ODB parameters from the ODB itself, so the clients were "learning" about the ODB structure
> dynamically, at run time? Or that knowledge has to be static ?
unfortunately, the "open records" structure is allocated at compile-time inside the ODB header,
making any change to this would break binary compatibility.
I think it is possible to allocate "space for additional open records" in the ODB data area
and have the ODB open records code use it in addition to the compile-time allocated
space in the database header. This would also work for extending MAX_CLIENTS.
Of course in this approach, old midas clients would see only the clients and open records
in the database header, new midas clients would see the additional data.
It is not super hard to add this code...
K.O. |
27 Apr 2026, Konstantin Olchanski, Bug Report, increasing the max number of hot links in ODB
|
> I wonder why one needs more than 256 hotlinks at all.
I confirm that ALPHA is running with MAX_OPEN_RECORDS changed from 256 to 2048,
this is the only experiment I know of that had to increase any MIDAS ODB defaults.
The reason for this is mlogger, it opens an open record for each variable in each equipment.
This should be changed to 1 db_watch per equipment. We talked about it, but I guess we never did it.
I think this task just went almost to the top of my MIDAS to-do list.
K.O. |
27 Apr 2026, Nick Hastings, Bug Report, increasing the max number of hot links in ODB
|
For the record, the ND280 (T2K near detector) MIDAS GSC was initially set up
with MAX_OPEN_RECORDS = 2560 and MAX_CLIENTS = 128.
In 2023 one fairly simple part of the detector was replaced with several
other more complex systems (many more midas frontends, equipments, and
variables being logged) so we updated MAX_OPEN_RECORDS = 4096 and
MAX_CLIENTS = 256.
Nick. |
27 Apr 2026, Pavel Murat, Bug Report, increasing the max number of hot links in ODB
|
> I wonder why one needs more than 256 hotlinks at all. Please note that with the odbxx "watch" API, you can hotline a whole subdirectory, and get notified if ANY of the
> underlying values or subdirectories change. In principle, one could have one hotlink to "/" and see all changes in the ODB (although that does not make sense and might slow
> down ODB access a bit).
Thanks ! - I didn't know that. I did run into a number of hotlinks limit via mlogger which complained about not being able to create a hotlink
to yet another event. Doubling the default value of MAX_OPEN_RECORDS solved the problem.
I don't know the exact arithmetic defining the number of hotlinks in the system, but my today's case is a case of
- 36 (linux servers) +18 (RPI) monitoring frontends managing one or several different equipment items each.
- Each equipment item sends to ODB at least one monitoring event
- in addition, each frontend created an individual hotlink for handling interactive commands
- for MAX_OPEN_RECORDS=256, 4 equipment items per frontend easily make it into the dangerous zone.
"Equipment items" also include the online processes running on the distributed computing farm processing the data ..
(we are not using MIDAS event building capabilities)
>
> Try the odbxx_test.cpp example in MIDAS. In line 210 it puts a single hotlink to /Experiment. If you change anything under /Experiment, the program gets notified. By checking the
> path of the changed ODB entry, it can figure out which of the subways have been changed:
>
> // watch ODB key for any change with lambda function
> midas::odb ow("/Experiment");
> ow.watch([](midas::odb &o) {
> std::cout << "Value of key \"" + o.get_full_path() + "\" changed to " << o << std::endl;
> });
>
>
> Maybe that would solve your problem without having to change the maximum number of hotlinks.
I'll see how much mileage one can make here, but so far it looks that it is the number of various monitoring events
handled by the mlogger which drives the number of hotlinks
-- thanks, regards, Pavel |
27 Apr 2026, Pavel Murat, Bug Report, increasing the max number of hot links in ODB
|
> > I wonder why one needs more than 256 hotlinks at all.
>
> I confirm that ALPHA is running with MAX_OPEN_RECORDS changed from 256 to 2048,
> this is the only experiment I know of that had to increase any MIDAS ODB defaults.
>
> The reason for this is mlogger, it opens an open record for each variable in each equipment.
>
> This should be changed to 1 db_watch per equipment. We talked about it, but I guess we never did it.
>
> I think this task just went almost to the top of my MIDAS to-do list.
I definitely had many more than 256 variables successfully monitored with MAX_OPEN_RECORDS=256.
Is it possible that mlogger creates a hotlink per monitoring event, not per variable ?
- I think, that would make more sense in almost any scenario...
-- thanks, regards, Pavel |
27 Apr 2026, Pavel Murat, Bug Report, increasing the max number of hot links in ODB
|
> > Indeed, updating MIDAS clients on each and every RPI etc in a running experiment may be a real challenge.
>
> actually, only local clients must be rebuilt, remote clients connecting to the mserver do not care about ODB
> internal structure.
thanks! I see - local clients do know about the memory mapping, remote ones - don't
> unfortunately, the "open records" structure is allocated at compile-time inside the ODB header,
> making any change to this would break binary compatibility.
right, I guess, what I had in mind would require the very first fODB record to be a format descriptor,
and that would be a breaking change... Anyway, the practical part of the problem is addressed,
so I just add here a link which contains an answer to the original posting (I found it only after the fact):
https://daq00.triumf.ca/MidasWiki/index.php/FAQ#Increasing_Number_of_Hot-links
-- thanks again, regards, Pavel |
|