fpillet / NSLogger

A modern, flexible logging tool
Other
5k stars 573 forks source link

Mojave 10.14.3 -- libnetcore-1229.240.1 #276

Closed mischievous closed 5 years ago

mischievous commented 5 years ago

Keep getting (3) stderr messages from libnetcore the first time a message is logger. Using the Mac Test Program....

[6 ] 04:38:11.766 | stderr | Thread 4 | 2019-01-29 04:38:11.765975-0800 NSLoggerMacClientTest[1291:46792] [] -[NWConcrete_nw_endpoint port] incorrect endpoint type 3

[7 ] 04:38:11.766 | stderr | Thread 4 | 2019-01-29 04:38:11.766016-0800 NSLoggerMacClientTest[1291:46792] [] __nwlog_err_simulate_crash simulate crash failed "-[NWConcrete_nw_endpoint port] incorrect endpoint type 3"

[8 ] 04:38:11.766 | stderr | Thread 4 | 2019-01-29 04:38:11.766297-0800 NSLoggerMacClientTest[1291:46792] [] -[NWConcrete_nw_endpoint port] incorrect endpoint type 3, dumping backtrace: [x86_64] libnetcore-1229.240.1 0 libnetwork.dylib 0x00007fff5f015b78 __nw_create_backtrace_string + 120 1 libnetwork.dylib 0x00007fff5ef976aa -[NWConcrete_nw_endpoint port] + 154 2 libnetwork.dylib 0x00007fff5ed8d20e nw_endpoint_get_port + 46 3 libnetwork.dylib 0x00007fff5ed8556d nw_connection_endpoint_report + 3565 4 libnetwork.dylib 0x00007fff5ed84750 nw_endpoint_handler_report + 160 5 libnetwork.dylib 0x00007fff5eda8e2b nw_endpoint_resolver_receive_report + 827 6 libnetwork.dylib 0x00007fff5ed84750 nw_endpoint_handler_report + 160 7 libnetwork.dylib 0x00007fff5eda8e2b nw_endpoint_resolver_receive_report + 827 [9 ] 04:38:11.766 | stderr | Thread 4 | 8 libnetwork.dylib 0x00007fff5ed84750 nw_endpoint_handler_report + 160 9 libnetwork.dylib 0x00007fff5ee02d15 nw_endpoint_flow_connected_path_change + 2261 10 libnetwork.dylib 0x00007fff5ee007da nw_endpoint_flow_connected + 1434 11 libnetwork.dylib 0x00007fff5edd8b07 nw_endpoint_flow_protocol_connected + 1191 12 libnetwork.dylib 0x00007fff5edd5bb5 nw_socket_handle_socket_event + 1621 13 libdispatch.dylib 0x00000001003697c3 _dispatch_client_callout + 8 14 libdispatch.dylib 0x000000010036cbcd _dispatch_continuation_pop + 576 15 libdispatch.dylib 0x0000000100381506 _dispatch_source_invoke + 2109 16 libdispatch.dylib 0x00000001003743e7 _dispatch_workloop_invoke + 3562 17 libdispatch.dylib 0x000000010037df44 _dispatch_workloop_worker_thread + 691

fpillet commented 5 years ago

This is unfortunately an internal issue in Mojave that I cannot fix: Apple left some internal caught-exception logs percolate to userspace when they (as far as I understand it) mapped the CFStream APIs to the new Network.framework. At this stage, there is nothing I can do to prevent this, short of rewriting the NSLogger client code to use different APIs.

At this time I don't have anything better to give you, sorry.

mischievous commented 5 years ago

It's cool. Right now since I am not using stderr in my code I just commented out the call to LoggerLogFromConsole for stderr from LoggerConsoleGrabThread.

It works and removes the logs from showing up in Xcode and the NSLogger.

Maybe I should use my enterprise license to issue a bug report.

Thanks for getting back to me so fast.

fpillet commented 5 years ago

Yeah I need to file a radar about this one too, because this is not something we can fix on our side - Apple has to fix it in the OS. Filing a radar from your side may help getting it resolved faster :)

Thanks!

mischievous commented 5 years ago

https://bugreport.apple.com/web/?problemID=47631616