getaddrinfo - Error: libc suspend() called from non-user context (0x117549a) - aborting
Hi all, when I use the lwip networking I sometimes get the following error: > Error: libc suspend() called from non-user context (0x117549a) - aborting I have tracked it down to a call of getaddrinfo yet I could not find out when exactly and why this happens. It occurs at ca. 50% of the tries. Does anyone have an idea how to fix that? Also is there a way to check if an IP is available? Sleeping a few seconds and hoping that DHCP assigned an address does not seem a reliable solution to me. The full code is available at [1], [2] and [3] while the error happens in [3] at line 24. To test it yourself, check out [4] and run `make run/sntp`. Regards, Johannes [1]: https://github.com/jklmnn/genode-world/blob/sntp/src/server/sntp/main.cc [2]: https://github.com/jklmnn/genode-world/blob/sntp/src/server/sntp/client.h [3]: https://github.com/jklmnn/genode-world/blob/sntp/src/server/sntp/client.cc [4]: https://github.com/jklmnn/genode-world/tree/sntp/src/server/sntp -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: qt5 build problem
Removed contrib/qt5... directory. Pointed to remote .zip and changed SHA1 value and rebuilt. Works until patches, as before. /contrib/qt... directory is back with .incomplete extension again Sent from my iPhone > On Feb 6, 2018, at 1:06 PM, Robert Sutherland via genode-main >wrote: > > Hi Christian > > 1. Ubuntu 14.04 > 2. 8.21 > 3. contrib/0171ade66403e7d2f48d08009cb49eae9f731f76.incomplete > > Is the directory. I don't think '.incomplete' is correct. I deleted the > directory and tried to build but it's still running. > > sha1sum returns a number NOT consistent with makefile variable. It gives: > > da39a3ee5e6b4b0d3255bfef95601890afd80709. > > But, as noted in original email, I downloaded the .gz file, ran sha1sum to > verify it matched the makefile number, then pointed the makefile to the local > copy. This didn't work. > > I'll let you know when qt5 prepare is done or fails. > > Thanks for the help > > Sent from my iPhone > >> On Feb 6, 2018, at 8:27 AM, Christian Helmuth >> wrote: >> >> Hello Robert, >> >>> On Mon, Feb 05, 2018 at 10:15:44PM -0500, Robert Sutherland via genode-main >>> wrote: >>> I have some problems with the qt5 build. The first being a sha1sum issue >>> with qtscriptclassic-1.0_1-opensource. The initial build gives: >>> >>> qt5 extract qtwebkit-opensource-src-5.8.0.tar.xz >>> (qtwebkit-opensource-src-5.8.0) >>> Error: Hash sum check for qtscriptclassic-1.0_1-opensource failed >>> make[2]: *** [qtscriptclassic-1.0_1-opensource.file] Error 1 >>> make[1]: *** [_install_in_port_dir] Error 2 >>> make: *** [qt5] Error 2 >>> >>> I ran the sha1sum program on all of the remote archives for *.gz and >>> downloaded the file for *.gz as well, all of which failed. >> >> I have three questions to further investigate the issue: >> >> 1. Which host system are you building Genode on? >> (Ubuntu 16.04 and flavors works pretty well.) >> >> 2. What does "sha1sum --version" print to the terminal? >> (mine prints sha1sum (GNU coreutils) 8.25) >> >> 3. What is the output of "sha1sum >> contrib/qt5-0171ade66403e7d2f48d08009cb49eae9f731f76/qtscriptclassic-1.0_1-opensource.tar.gz" >> (I get 74e9dc82dd194d8ae0fb0f8f1df74081948b943a >> contrib/qt5-0171ade66403e7d2f48d08009cb49eae9f731f76/qtscriptclassic-1.0_1-opensource.tar.gz) >> >> 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 >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> genode-main mailing list >> genode-main@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/genode-main > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > genode-main mailing list > genode-main@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/genode-main -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: qt5 build problem
Still failed at same place. Generated a contrib directory tagged .incomplete. Sent from my iPhone > On Feb 6, 2018, at 1:06 PM, Robert Sutherland via genode-main >wrote: > > Hi Christian > > 1. Ubuntu 14.04 > 2. 8.21 > 3. contrib/0171ade66403e7d2f48d08009cb49eae9f731f76.incomplete > > Is the directory. I don't think '.incomplete' is correct. I deleted the > directory and tried to build but it's still running. > > sha1sum returns a number NOT consistent with makefile variable. It gives: > > da39a3ee5e6b4b0d3255bfef95601890afd80709. > > But, as noted in original email, I downloaded the .gz file, ran sha1sum to > verify it matched the makefile number, then pointed the makefile to the local > copy. This didn't work. > > I'll let you know when qt5 prepare is done or fails. > > Thanks for the help > > Sent from my iPhone > >> On Feb 6, 2018, at 8:27 AM, Christian Helmuth >> wrote: >> >> Hello Robert, >> >>> On Mon, Feb 05, 2018 at 10:15:44PM -0500, Robert Sutherland via genode-main >>> wrote: >>> I have some problems with the qt5 build. The first being a sha1sum issue >>> with qtscriptclassic-1.0_1-opensource. The initial build gives: >>> >>> qt5 extract qtwebkit-opensource-src-5.8.0.tar.xz >>> (qtwebkit-opensource-src-5.8.0) >>> Error: Hash sum check for qtscriptclassic-1.0_1-opensource failed >>> make[2]: *** [qtscriptclassic-1.0_1-opensource.file] Error 1 >>> make[1]: *** [_install_in_port_dir] Error 2 >>> make: *** [qt5] Error 2 >>> >>> I ran the sha1sum program on all of the remote archives for *.gz and >>> downloaded the file for *.gz as well, all of which failed. >> >> I have three questions to further investigate the issue: >> >> 1. Which host system are you building Genode on? >> (Ubuntu 16.04 and flavors works pretty well.) >> >> 2. What does "sha1sum --version" print to the terminal? >> (mine prints sha1sum (GNU coreutils) 8.25) >> >> 3. What is the output of "sha1sum >> contrib/qt5-0171ade66403e7d2f48d08009cb49eae9f731f76/qtscriptclassic-1.0_1-opensource.tar.gz" >> (I get 74e9dc82dd194d8ae0fb0f8f1df74081948b943a >> contrib/qt5-0171ade66403e7d2f48d08009cb49eae9f731f76/qtscriptclassic-1.0_1-opensource.tar.gz) >> >> 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 >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> genode-main mailing list >> genode-main@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/genode-main > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > genode-main mailing list > genode-main@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/genode-main -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Share a variable of Core with other components
Hi, First of all, I really appreciate the comments that helped me a lot. Finally, I solved my problem. The most critical problem in my implementation was to use a virtual address to make a Rom_module. For the reference, I summarized my implementation as follows: 1) Core(repos/base/src/core/main.cc) static unsigned char core_data[32]; /* data I'd like to share */ int main() { ... /* allocate dataspace used for creating shared memory between core and others*/ Dataspace_capability ds = env()->ram_session()->alloc(4096); void* local_addr = env()->rm_session()->attach(ds); Genode::memcpy((void*)local_addr, (const void*) core_data, 32); /* add to ROM FS */ Rom_module *rom_module = new (platform()->core_mem_alloc()) Rom_module((addr_t)Dataspace_client(ds).phys_addr(), /* Here, use phys_addr */ 4096, "core_data"); platform()->rom_fs()->insert(rom_module); ... } 2) tz_vmm(repos/or/src/server/tz_vmm/spec/imx53/main.cc) static unsigned char core_data[32]={0,}; int main() { Attached_rom_dataspace rom("core_data"); if(!rom.is_valid()) Genode::log("attached_rom_dataspace() is not valid!"); else{ Genode::memset(core_data, 0, sizeof(core_data)); Genode::memcpy(core_data, rom.local_addr(), sizeof(core_data); } ... } I hope this share can help others. Jaemin Park On Tue, Feb 6, 2018 at 7:08 PM, Stefan Kalkowski < stefan.kalkow...@genode-labs.com> wrote: > Hi Jaemin, > > On Tue, Feb 06, 2018 at 09:20:03AM +0900, Jaemin Park wrote: > > Hi, > > > > I'd like to add some log information for clarification. > > > > In Core, the address of populated rm_session(local_addr) is 0x12d000. > > When Rom_module is created inside Core, the address of it(rom_module) is > > also 0x12d000. > > a Rom_module expects a physical address as the first constructor > argument, not a core/kernel virtual one. > > See my comments below. > > > > > In tz_vmm, the address of local_data(attached to Dataspace_capability) is > > 0xc000. > > The error message displayed in the previous e-mail happens when tz_vmm > > attempted to access local_data(0xc000) by memcpy(). > > > > I hope this clarification can help you give me an advice or any comments. > > > > Jaemin Park > > > > > > On Mon, Feb 5, 2018 at 9:59 AM, Jaemin Parkwrote: > > > > > Hi, > > > > > > I attempted to implement a read-only method to share a variable of > Core. > > > > > > My attempt showed me an error as follows: > > > Error: init -> tz_vmm -> ep: raised unhandled data abort DFSR=0x1008 > > > ISFR=0x7 DFAR=0xc000 ip=0x70010c40 sp=0xe02fef00 > > > > > > My implementation is as follows(blue-colored parts): > > > > > > 1) Core(repos/base/src/core/main.cc) > > > > > > static unsigned char core_data[32]; /* data I'd like to share */ > > > > > > int main() > > > { > > > ... > > > Pd_connection init_pd("init"); > > > Core_child *init = new (env()->heap()) > > > Core_child(Rom_session_client( > init_rom_session_cap).dataspac > > > e(), > > > init_pd, init_ram_session_cap, init_cpu.cap(), > > > local_services); > > > > > > /* allocate dataspace used for creating shared memory between > > > core and init */ > > > 342 Dataspace_capability ds = env()->ram_session()->alloc(4096); > > > 343 void* local_addr = env()->rm_session()->attach(ds); > > > 344 Genode::printf("local_addr=0x%p\n", local_addr); > > > 345 Genode::memcpy((void*)local_addr, (const void*) core_data, > 32); > > > 346 > > > 347 /* add to ROM FS */ > > > 348 Rom_module *rom_module = new (platform()->core_mem_alloc()) > > > 349 Rom_module((addr_t)local_addr, 4096, "core_data"); > > You have to take the physical memory address of the dataspace "ds" > instead of "local_addr" here. > > > > 350 platform()->rom_fs()->insert(rom_module); > > > 351 > > > platform()->wait_for_exit(); > > > ... > > In general, this generic code location is not appropriated for your > attempt. I think, the Platform() constructor in: > > repos/base-hw/src/core/platform.cc > > might be a better place for your snippet. There you will also find an > example of the "core log" being exported as dataspace in more recent > Genode development branches, e.g., staging branch. > > > > } > > > > > > 2) tz_vmm(repos/os/src/server/tz_vmm/spec/imx53/main.cc) > > > > > > int main() > > > { > > > 149 /* obtain core_data */ > > > 150 Dataspace_capability ds; > > > 151 try{ > > > 152 static Genode::Rom_connection rom("core_data"); > > > 153 ds = rom.dataspace(); > > > 154 }catch(...){ > > > 155 error("ROM module \"core_data\" not present");} > > > 156 > > > 157 void* core_data = > > > 158 (void*)
Re: qt5 build problem
Maybe the following conversation helps you further? https://sourceforge.net/p/genode/mailman/message/34796432/ Did you change the link in the qt5.port file? 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 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
FOSDEM 2018 presentations
Hello everyone, the recordings of the following Genode-related talks at FOSDEM 2018 are available now: * GPU resource multiplexing in component-based systems by Sebastian Sumpf https://fosdem.org/2018/schedule/event/microkernel_genode_gpu_multiplexing/ * Live sculpting a Genode-based operating system by Norman Feske https://fosdem.org/2018/schedule/event/microkernel_genode_live_sculpting/ * User-level networking on Genode by Martin Stein https://fosdem.org/2018/schedule/event/microkernel_genode_user_level_networking/ I'd like to thank the FOSDEM organizers for the fantastic conference and especially Jakub Jermar who organized this year's microkernel devroom! Cheers Norman -- Dr.-Ing. Norman Feske Genode Labs https://www.genode-labs.com · https://genode.org Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Share a variable of Core with other components
Hi Jaemin, On Tue, Feb 06, 2018 at 09:20:03AM +0900, Jaemin Park wrote: > Hi, > > I'd like to add some log information for clarification. > > In Core, the address of populated rm_session(local_addr) is 0x12d000. > When Rom_module is created inside Core, the address of it(rom_module) is > also 0x12d000. a Rom_module expects a physical address as the first constructor argument, not a core/kernel virtual one. See my comments below. > > In tz_vmm, the address of local_data(attached to Dataspace_capability) is > 0xc000. > The error message displayed in the previous e-mail happens when tz_vmm > attempted to access local_data(0xc000) by memcpy(). > > I hope this clarification can help you give me an advice or any comments. > > Jaemin Park > > > On Mon, Feb 5, 2018 at 9:59 AM, Jaemin Parkwrote: > > > Hi, > > > > I attempted to implement a read-only method to share a variable of Core. > > > > My attempt showed me an error as follows: > > Error: init -> tz_vmm -> ep: raised unhandled data abort DFSR=0x1008 > > ISFR=0x7 DFAR=0xc000 ip=0x70010c40 sp=0xe02fef00 > > > > My implementation is as follows(blue-colored parts): > > > > 1) Core(repos/base/src/core/main.cc) > > > > static unsigned char core_data[32]; /* data I'd like to share */ > > > > int main() > > { > > ... > > Pd_connection init_pd("init"); > > Core_child *init = new (env()->heap()) > > Core_child(Rom_session_client(init_rom_session_cap).dataspac > > e(), > > init_pd, init_ram_session_cap, init_cpu.cap(), > > local_services); > > > > /* allocate dataspace used for creating shared memory between > > core and init */ > > 342 Dataspace_capability ds = env()->ram_session()->alloc(4096); > > 343 void* local_addr = env()->rm_session()->attach(ds); > > 344 Genode::printf("local_addr=0x%p\n", local_addr); > > 345 Genode::memcpy((void*)local_addr, (const void*) core_data, 32); > > 346 > > 347 /* add to ROM FS */ > > 348 Rom_module *rom_module = new (platform()->core_mem_alloc()) > > 349 Rom_module((addr_t)local_addr, 4096, "core_data"); You have to take the physical memory address of the dataspace "ds" instead of "local_addr" here. > > 350 platform()->rom_fs()->insert(rom_module); > > 351 > > platform()->wait_for_exit(); > > ... In general, this generic code location is not appropriated for your attempt. I think, the Platform() constructor in: repos/base-hw/src/core/platform.cc might be a better place for your snippet. There you will also find an example of the "core log" being exported as dataspace in more recent Genode development branches, e.g., staging branch. > > } > > > > 2) tz_vmm(repos/os/src/server/tz_vmm/spec/imx53/main.cc) > > > > int main() > > { > > 149 /* obtain core_data */ > > 150 Dataspace_capability ds; > > 151 try{ > > 152 static Genode::Rom_connection rom("core_data"); > > 153 ds = rom.dataspace(); > > 154 }catch(...){ > > 155 error("ROM module \"core_data\" not present");} > > 156 > > 157 void* core_data = > > 158 (void*) Genode::env()->rm_session()->attach(ds); > > 159 Genode::size_t size = Genode::Dataspace_client(ds).size(); > > 160 static unsigned char local_data[32]; > > 161 Genode::memcpy((void*)local_data, (const void*)core_data, size); > > /* data abort happens here */ Here, you'll copy 4096 bytes to a local variable, which is only 32 bytes in size! What kind of data do you export from core to the VMM, and why don't you use the VM dataspace therefore? Regards Stefan > > 162 Genode::env()->rm_session()->detach(measurement); > > > >static Vm vm("linux", cmdline_tablet, > > Trustzone::NONSECURE_RAM_BASE, > > Trustzone::NONSECURE_RAM_SIZE, > > KERNEL_OFFSET, MACH_TYPE_QSB); > > static Vmm::Vmm vmm(); > > ... > > } > > > > Is there any comment on my implementation? > > Any comment comments would be highly appreciated. > > > > JaeminPark > > > > > > On Fri, Feb 2, 2018 at 9:49 PM, Jaemin Park wrote: > > > >> Hi, > >> > >> I really appreciate your kind and quick response. > >> > >> In my case, a one-way read-only fashion is enough. > >> I'd like to share an information that other components can read only. > >> > >> If you can give me an example or any reference code published in the git > >> repository, please let me know. > >> > >> Sorry for a newbie's request. > >> > >> JaeminPark > >> > >> On Fri, Feb 2, 2018 at 6:27 PM, Stefan Kalkowski < > >> stefan.kalkow...@genode-labs.com> wrote: > >> > >>> Hi Jaemin, > >>> > >>> On Fri, Feb 02, 2018 at 11:28:53AM +0900, Jaemin Park wrote: > >>> > Hi, > >>> > > >>> > I'd like to ask a question about a way to "share a variable of Core > >>> with > >>> > other components". > >>> > > >>> > I'm using i.MX53 QSB, so this question is based on