Opened 12 years ago
Closed 12 years ago
#9116 closed bug (fixed)
liblocale.so: Bad port ID
Reported by: | luroh | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Servers/app_server | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
For years now, if you boot an image and open a few applications you can see corresponding entries like these popping up in the syslog:
USER 'liblocale.so'[224]: app application/x-vnd.Haiku-StyledEdit send to client failed: Bad port ID USER 'liblocale.so'[238]: app application/x-vnd.Haiku-WebPositive send to client failed: Bad port ID Last message repeated 2 times USER 'liblocale.so'[373]: app application/x-vnd.Haiku-Terminal send to client failed: Bad port ID
Perhaps not a bug, I have no idea what these are good (or bad, rather) for.
Change History (9)
comment:1 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 12 years ago
Component: | Kits/Locale Kit → Servers/app_server |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
The log messages are still with us, just no longer attributed to liblocale.so
comment:3 by , 12 years ago
The log messages are generated in src/servers/app/ServerApp.cpp, SendMessageToClient. By running 'tail -f /boot/common/var/log/syslog' I have observed that the messages get logged when quitting an application, if that's of any help.
comment:5 by , 12 years ago
This looks like it's coming from http://cgit.haiku-os.org/haiku/tree/src/servers/app/ServerApp.cpp#n294
I don't know the code well enough to get to what is sending the "Bad port ID" message to that, but that's the line that actually sends the message to the syslog as far as I can tell.
The "Bad port ID" part of the message comes from http://cgit.haiku-os.org/haiku/tree/src/system/libroot/posix/string/strerror.c#n114
So if someone who can actually understand the code can see which one of the calls to SendMessageToClient() actually sends that message, and why... that could probably lead to the fix for this. It's a bit over my head still unfortunately.
comment:6 by , 12 years ago
Given comment:3, I would suspect what is happening is when an application quits, the app_server tries to send one or more messages back to the application. But in some (or maybe all) cases, the application has already closed, so the port is no longer valid and the sending of the message fails, and then the error is logged.
It would require some debugging, but I suspect the solution involves not trying to send messages when an application is quitting.
comment:7 by , 12 years ago
Should be fixed with hrev45437. I'll leave this one open for now, though. Note, the message might still appear, but should not do so regularly anymore.
comment:8 by , 12 years ago
Verified to be fixed in hrev45437, the message no longer appears when closing an app. Thanks, Axel!
comment:9 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Well, thanks for the investigation in the first place! This actually will also fix a bug in my background branch at github where the client memory allocator may survive the death of the application.
Should be fixed in hrev44867, at least the Locale Kit is no longer using syslog.