0

I am using the very nice libconfig library, made by Mark Lindner. It is available as part of a Red Hat installation.

Sometimes, when I called config_lookup the call doesn't return. Most times it does.

Instead, the process stops running, and our watchdog script notices that it has stopped running and restarts it.

The output and the code is below. Is this a known behavior of config_lookup?

08/11/2020 17:54:37: debug - before call to config_lookup
08/11/2020 17:55:05: Started:          Tue Aug 11 17:55:05 2020
    int               i;
    int               sapfco_length;
    config_setting_t* sapfco;

    LogMessageLevel(4, "debug - before call to config_lookup");

    sapfco = config_lookup(&cfg, "sponsors_and_programs_for_cat_outbound");

    LogMessageLevel(4, "debug - *after* call to config_lookup");
    LogMessageLevel(4, "debug - sapfco = 0x%8.8x", sapfco);
user2171796
  • 397
  • 2
  • 16
  • Running the program with valgrind reveals some problems. That's probably the answer. I'll investigate over the next couple of days, and post any findings here. – user2171796 Aug 12 '20 at 07:51
  • Okay, now the program gets a clean bill of health from valgrind. Same behavior. Program occasionally ends without ceremony inside the config_lookup call. – user2171796 Aug 14 '20 at 13:34
  • It behaves as though, inside the call, an exception is caught, and the library simply calls exit. I guess since it is open-source code, I should look and see! – user2171796 Aug 14 '20 at 13:35

0 Answers0