Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix garbage in C/python log messages in CMA #84

Open
Alan-R opened this issue Aug 4, 2020 · 1 comment
Open

Fix garbage in C/python log messages in CMA #84

Alan-R opened this issue Aug 4, 2020 · 1 comment
Labels
CMA related to the Collective Management Authority nanoprobe related to our agent (on every system)

Comments

@Alan-R
Copy link
Member

Alan-R commented Aug 4, 2020

Here are some sample outputs:

Aug  3 18:35:39 servidor <80><93>þk<8a>^?[23135]: DEBUG: _netio_setsockbufsize.278: trying to set input buffer size to 10485760
Aug  3 18:35:39 servidor <80><93>þk<8a>^?[23135]: DEBUG: _netio_setsockbufsize.278: trying to set output buffer size to 1048576

The process ID (23235) is the parent process for the CMA:

assimil+ 23135 23132  0 18:35 pts/1    00:00:05 python ./cma.py --debug 2 --erasedb --foreground

This is very consistent and happens every time we start the CMA.
There are corresponding log messages from the CMA itself, and they look just fine:

Aug  3 18:35:55 servidor cma INFO: Socket input buffer size:  20971518
Aug  3 18:35:55 servidor cma INFO: Socket output buffer size: 2097150
@Alan-R Alan-R added CMA related to the Collective Management Authority nanoprobe related to our agent (on every system) labels Aug 4, 2020
@Alan-R
Copy link
Member Author

Alan-R commented Aug 4, 2020

The code generating this message is:

DEBUGMSG2("%s.%d: trying to set %sput buffer size to %d", __FUNCTION__, __LINE__
	,	 (forinput ? "in" : "out"), retval);

DEBUGMSG2 is defined as:

#define DEBUGMSG2(...) DEBUGMSGn(2, __VA_ARGS__)

and DEBUGMSGn is defined as:

#define DEBUGMSGn(n, ...) {if (DEBUG >= (n)) {g_debug(__VA_ARGS__);};}

Which comes down to g_debug from glib2.
This used to work.
Which makes me think maybe it's a change in Glib.
I suspect things related to g_log_writer_default() - which formats things suitable for the systemd journal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMA related to the Collective Management Authority nanoprobe related to our agent (on every system)
Projects
None yet
Development

No branches or pull requests

1 participant