Comment 1 for bug 1876744

Revision history for this message
Paul Wise (Debian) (pabs) wrote : Re: [Bug 1876744] [NEW] g_thread_new() fails with "creating thread 'gps thread': Error creating thread: Resource temporarily unavailable".

I can't reproduce this on the x86 hardware that I have.

It sounds like you are running FoxtrotGPS on a Raspberry Pi?

Which operating system are you running?

Do you know what the thread limits are on your OS? Run this:

   $ cat /proc/sys/kernel/threads-max
   95400

As a workaround you can also increase the amount of threads:

   sudo sh -c 'echo 1000000 > /proc/sys/kernel/threads-max'

Are there any particular circumstances where it happens? Like just
after downloading a lot of tiles or something like that?

Please try to figure out which of the threads is being created but not
destroyed. I assume it isn't the gps thread, that is probably just the
final one that causes the limit to be reached. On my system I see this:

   $ grep Name /proc/$(pgrep foxtrotgps)/task/*/status
   /proc/457081/task/457081/status:Name: foxtrotgps
   /proc/457081/task/457082/status:Name: gmain
   /proc/457081/task/457083/status:Name: dconf worker
   /proc/457081/task/457084/status:Name: gdbus
   /proc/457081/task/466976/status:Name: download thread
   /proc/457081/task/466977/status:Name: download thread
   /proc/457081/task/466978/status:Name: download thread
   /proc/457081/task/466982/status:Name: download thread
   /proc/457081/task/466984/status:Name: download thread
   /proc/457081/task/466985/status:Name: download thread

If you are able to bisect this issue to find out which commit causes
it, that would help in resolving the problem. I'm assuming it was
caused by the commit changing to the new GLib thread APIs.

--
bye,
pabs

https://wiki.debian.org/PaulWise