grpc server causes deadlock in libc

Stefan Thöni stefan.thoeni at gapfruit.com
Thu Oct 24 14:57:32 CEST 2019


Hello Genodians

We have ported google protocol buffers and the Google RPC (grpc) to
genode and would like to contribute that to genode world.

We encountered a problem with the port in which grpc server deadlocks
when using the poll function of libc to poll sockets via the lwip or
lxip plugin. We determined that poll calls Libc::suspend in task.cc
which in term calls Pthreads::suspend_myself where the deadlock oocurs
at myself.lock.lock();.

Note that the grpc server uses several threads which apparantly are all
waiting/suspended when the problem occurred.

You can check out or working branch at
https://github.com/trimpim/genode-world/commit/18da8122f805de0a137b778a6d83ca05127fe3bc
and execute scenario using run/grpc runscript reproduce the problem.

Does anyone has any idea why a deadlock might occur in that situation?

Kind regards
Stefan

-- 
Freundliche Grüsse

Stefan Thöni
Chairman of the Board
Senior Security Architect
+41 79 610 64 95

gapfruit AG
Baarerstrasse 135
6300 Zug
https://gapfruit.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x05D66A288F9939FF.asc
Type: application/pgp-keys
Size: 25417 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20191024/7c48d482/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stefan_thoeni.vcf
Type: text/x-vcard
Size: 173 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20191024/7c48d482/attachment-0001.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.genode.org/pipermail/users/attachments/20191024/7c48d482/attachment-0001.sig>


More information about the users mailing list