Discussion:
lxip echo not working
Boris Mulder
2017-03-09 11:00:23 UTC
Permalink
Hi,

I'm trying to play around with the new lxip vfs plugin. First, I tried
running the echo_udp.run test (on linux), but when I run the echo
component it exits with the following error message:

"Error: no plugin found for socket()"

However, since I did create a network interface I am able to ping the
network stack. Other than the IP address I did not change anything in
the config (or somewhere else).

Can anyone help me out?
--
Met vriendelijke groet / kind regards,

Boris Mulder

Cyber Security Labs B.V. | Gooimeer 6-31 | 1411 DD Naarden | The Netherlands
+31 35 631 3253 (office)
Christian Helmuth
2017-03-09 11:14:01 UTC
Permalink
Hello Boris,
Post by Boris Mulder
I'm trying to play around with the new lxip vfs plugin. First, I tried
running the echo_udp.run test (on linux), but when I run the echo
"Error: no plugin found for socket()"
Unfortunately, a small bug slipped into the release which is already
fixed in our staging branch

https://github.com/genodelabs/genode/commit/72d59719409070684d267487e8c3e0485b80e3e3

Greets
--
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Boris Mulder
2017-03-10 15:58:11 UTC
Permalink
When I make my own component that uses libc sockets, whenever I call
socket(), I get a segmentation fault.

If I edit the echo test and make it use Libc::Component::construct
instead of posix libc 'int main()' (and adding the right dependencies to
the makefiles), the same thing happens.

So it seems the libc sockets are only working under the posix libc API.

How can I make my own Genode component that uses both the genode
Component API and the linux tcp/ip stack with sockets?
Post by Christian Helmuth
Hello Boris,
Post by Boris Mulder
I'm trying to play around with the new lxip vfs plugin. First, I tried
running the echo_udp.run test (on linux), but when I run the echo
"Error: no plugin found for socket()"
Unfortunately, a small bug slipped into the release which is already
fixed in our staging branch
https://github.com/genodelabs/genode/commit/72d59719409070684d267487e8c3e0485b80e3e3
Greets
--
Met vriendelijke groet / kind regards,

Boris Mulder

Cyber Security Labs B.V. | Gooimeer 6-31 | 1411 DD Naarden | The Netherlands
+31 35 631 3253 (office)
Christian Prochaska
2017-03-10 16:59:13 UTC
Permalink
Hi Boris,
Post by Boris Mulder
How can I make my own Genode component that uses both the genode
Component API and the linux tcp/ip stack with sockets?
One important requirement when implementing 'Libc::Component::construct()' is to wrap the socket-using code in the
'Libc::with_libc()' function.

Please see https://genode.org/documentation/release-notes/17.02#New_execution_model_of_the_C_runtime for more details.
Boris Mulder
2017-03-13 09:07:57 UTC
Permalink
Well, the socket() call seems to work now, but somewhere within bind()
it gives the following errors:

[init -> echo] Warning: getnameinfo: getnameinfo not implemented
[init -> echo] Error: Uncaught exception of type '(anonymous
namespace)::Address_conversion_failed'

it seems that inside libports/src/lib/libc/socket_fs_plugin.cc, it tries
to call an unimplemented function getnameinfo() and throws an exception
when that fails.
Just to make sure, I attached the code I copied from the echo test and
wrapped in the Component api.
Post by Christian Prochaska
Hi Boris,
Post by Boris Mulder
How can I make my own Genode component that uses both the genode
Component API and the linux tcp/ip stack with sockets?
One important requirement when implementing 'Libc::Component::construct()' is to wrap the socket-using code in the
'Libc::with_libc()' function.
Please see https://genode.org/documentation/release-notes/17.02#New_execution_model_of_the_C_runtime for more details.
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Met vriendelijke groet / kind regards,

Boris Mulder

Cyber Security Labs B.V. | Gooimeer 6-31 | 1411 DD Naarden | The Netherlands
+31 35 631 3253 (office)
Christian Helmuth
2017-03-13 09:53:17 UTC
Permalink
Hello Boris,
Post by Boris Mulder
Well, the socket() call seems to work now, but somewhere within bind()
[init -> echo] Warning: getnameinfo: getnameinfo not implemented
[init -> echo] Error: Uncaught exception of type '(anonymous
namespace)::Address_conversion_failed'
it seems that inside libports/src/lib/libc/socket_fs_plugin.cc, it tries
to call an unimplemented function getnameinfo() and throws an exception
when that fails.
Just to make sure, I attached the code I copied from the echo test and
wrapped in the Component api.
You're missing the libc_resolv libc plugin in your scenario. We intend to
merge this library back into the libc in the future but for historical
reasons it is currently a separate binary libc_resolv.lib.so. Please
refer to repos/libports/run/echo_udp.run for an example integrating
the plugin into the boot modules.

Regards
--
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Loading...