ERROR ### ASSERTION FAILED at line 206 in om_dbi.c/om_dbi_get_sql(): "len > j" ###

Tags: error | bug

#1 onyxbb

Hello,
We're testing nxlog and at least a few times per day it's throwing this error. When this happens the error repeats itself in the logs for a few hours until either the log fills up the  partition or the kernel kills nxlog due to memory running out (Out of memory: Kill process 2422 (nxlog) score 762 or sacrifice child).

I'm not a C programmer but looking at the om_dbi driver source it seems to me as if this assertion might be checking if the length of the SQL query is longer than a predefined constant. Could this be the case? Is there a limit on the size of the SQL query nxlog can send? I think I might be wrong because I've hardcoded SQL queries I believe are longer than those triggering the assertion error and they went through just fine.

I came across a thread on the same error and the poster stated they resolved the issue by recompiling nxlog from source. I did that but unfortunately the latest available source is from an older version and couldn't get our nxlog.conf to work with it.

Any ideas what this assertion is checking?

BTW, NXLog is running on CentOS 6.8 and there's plenty of free memory (8 GB) and CPU power available.

Thank you,
Babak B. 

#2 adm Nxlog ✓
#1 onyxbb
Hello, We're testing nxlog and at least a few times per day it's throwing this error. When this happens the error repeats itself in the logs for a few hours until either the log fills up the  partition or the kernel kills nxlog due to memory running out (Out of memory: Kill process 2422 (nxlog) score 762 or sacrifice child). I'm not a C programmer but looking at the om_dbi driver source it seems to me as if this assertion might be checking if the length of the SQL query is longer than a predefined constant. Could this be the case? Is there a limit on the size of the SQL query nxlog can send? I think I might be wrong because I've hardcoded SQL queries I believe are longer than those triggering the assertion error and they went through just fine. I came across a thread on the same error and the poster stated they resolved the issue by recompiling nxlog from source. I did that but unfortunately the latest available source is from an older version and couldn't get our nxlog.conf to work with it. Any ideas what this assertion is checking? BTW, NXLog is running on CentOS 6.8 and there's plenty of free memory (8 GB) and CPU power available. Thank you, Babak B. 

This is probably a bug in om_dbi. If you could prepare a test case to reproduce the issue that would help finding the cause.