Re: Usrsocktest app example fails
I try the test on simulator, and all cases pass without exception, maybe you can try the simulator in your environment to ensure your modification don't affect the system. On Mon, Feb 24, 2020 at 7:31 PM Oleg Evseev wrote: > Hi Xiang, > > I've checked https://github.com/apache/incubator-nuttx/pull/354 PR. It > fixed issues it supposed to fix, thanks. > > But I've still have semaphore assertion running test case > WakeBlockingConnectMultiThread > in do_wake_test() on third call in loop of sem_post(_releasesem) when > tidx is 2. > (examples/usrsocktest/usrsocktest_wake_with_signal.c:515) > [image: изображение.png] > > As I understand, you do not have such issue, so it's looks like reason is > totally somewhere in my configuration. > Especially due to fact that, as I wrote, I'm playing with it on Windows > inside px4 project on my custom board with stm32f405, using latest original > nuttx and apps. > > I had tried to increase twice CONFIG_EXAMPLES_USRSOCKTEST_STACKSIZE, it > didn't help, assertion in the same place. > > сб, 22 февр. 2020 г. в 18:11, Xiang Xiao : > >> The semaphore assertion look like the memory corrruption(maybe the >> stack too small) which platform you are running. >> >> On Sat, Feb 22, 2020 at 6:52 PM Oleg Evseev wrote: >> > >> > Hi Xiang, >> > >> > I can check it only on Monday, thanks! >> > >> > But, by the way, in commits you mentioned several errors in usrsocktest >> > that looks different than on my first screenshot (especially debug >> > assertion failed somewhere inside semaphore). Maybe there will still be >> > problems due to my wrong settings. Will see after checking this PR. >> > In any case, thanks for your time and support! >> > >> > сб, 22 февр. 2020 г. в 13:38, Xiang Xiao : >> > >> > > Oleg, try this PR: >> > > https://github.com/apache/incubator-nuttx/pull/354 >> > > with Masayuki and my patch, all test in usrsocktest should pass now. >> > > Actually, all fail is very minor: >> > > 1.Set the different errno >> > > 2.Foget to check NULL pointer >> > > 3.Don't zero the sockaddr padding bytes >> > > ,usrsock work well very even without these patch. >> >
Re: Usrsocktest app example fails
Hi Xiang, I've checked https://github.com/apache/incubator-nuttx/pull/354 PR. It fixed issues it supposed to fix, thanks. But I've still have semaphore assertion running test case WakeBlockingConnectMultiThread in do_wake_test() on third call in loop of sem_post(_releasesem) when tidx is 2. (examples/usrsocktest/usrsocktest_wake_with_signal.c:515) [image: изображение.png] As I understand, you do not have such issue, so it's looks like reason is totally somewhere in my configuration. Especially due to fact that, as I wrote, I'm playing with it on Windows inside px4 project on my custom board with stm32f405, using latest original nuttx and apps. I had tried to increase twice CONFIG_EXAMPLES_USRSOCKTEST_STACKSIZE, it didn't help, assertion in the same place. сб, 22 февр. 2020 г. в 18:11, Xiang Xiao : > The semaphore assertion look like the memory corrruption(maybe the > stack too small) which platform you are running. > > On Sat, Feb 22, 2020 at 6:52 PM Oleg Evseev wrote: > > > > Hi Xiang, > > > > I can check it only on Monday, thanks! > > > > But, by the way, in commits you mentioned several errors in usrsocktest > > that looks different than on my first screenshot (especially debug > > assertion failed somewhere inside semaphore). Maybe there will still be > > problems due to my wrong settings. Will see after checking this PR. > > In any case, thanks for your time and support! > > > > сб, 22 февр. 2020 г. в 13:38, Xiang Xiao : > > > > > Oleg, try this PR: > > > https://github.com/apache/incubator-nuttx/pull/354 > > > with Masayuki and my patch, all test in usrsocktest should pass now. > > > Actually, all fail is very minor: > > > 1.Set the different errno > > > 2.Foget to check NULL pointer > > > 3.Don't zero the sockaddr padding bytes > > > ,usrsock work well very even without these patch. >
Re: Usrsocktest app example fails
The semaphore assertion look like the memory corrruption(maybe the stack too small) which platform you are running. On Sat, Feb 22, 2020 at 6:52 PM Oleg Evseev wrote: > > Hi Xiang, > > I can check it only on Monday, thanks! > > But, by the way, in commits you mentioned several errors in usrsocktest > that looks different than on my first screenshot (especially debug > assertion failed somewhere inside semaphore). Maybe there will still be > problems due to my wrong settings. Will see after checking this PR. > In any case, thanks for your time and support! > > сб, 22 февр. 2020 г. в 13:38, Xiang Xiao : > > > Oleg, try this PR: > > https://github.com/apache/incubator-nuttx/pull/354 > > with Masayuki and my patch, all test in usrsocktest should pass now. > > Actually, all fail is very minor: > > 1.Set the different errno > > 2.Foget to check NULL pointer > > 3.Don't zero the sockaddr padding bytes > > ,usrsock work well very even without these patch. > > > > On Fri, Feb 21, 2020 at 4:17 PM Oleg Evseev wrote: > > > > > > Hi Masayuki, > > > > > > Thanks for the work! Looking forward to new PRs. > > > > > > пт, 21 февр. 2020 г. в 08:42, Ishikawa, Masayuki (SHES) < > > > masayuki.ishik...@sony.com>: > > > > > > > Hi, Oleg, > > > > > > > > > > > > > > > > Though I am not an author of the code, > > > > > > > > I found a couple of bugs both usrsocktest and nuttx. > > > > > > > > I will send PRs later. > > > > > > > > > > > > > > > > Regards, > > > > > > > > Masayuki > > > > > > > > > > > > > > > > > >
Re: Usrsocktest app example fails
Hi Xiang, I can check it only on Monday, thanks! But, by the way, in commits you mentioned several errors in usrsocktest that looks different than on my first screenshot (especially debug assertion failed somewhere inside semaphore). Maybe there will still be problems due to my wrong settings. Will see after checking this PR. In any case, thanks for your time and support! сб, 22 февр. 2020 г. в 13:38, Xiang Xiao : > Oleg, try this PR: > https://github.com/apache/incubator-nuttx/pull/354 > with Masayuki and my patch, all test in usrsocktest should pass now. > Actually, all fail is very minor: > 1.Set the different errno > 2.Foget to check NULL pointer > 3.Don't zero the sockaddr padding bytes > ,usrsock work well very even without these patch. > > On Fri, Feb 21, 2020 at 4:17 PM Oleg Evseev wrote: > > > > Hi Masayuki, > > > > Thanks for the work! Looking forward to new PRs. > > > > пт, 21 февр. 2020 г. в 08:42, Ishikawa, Masayuki (SHES) < > > masayuki.ishik...@sony.com>: > > > > > Hi, Oleg, > > > > > > > > > > > > Though I am not an author of the code, > > > > > > I found a couple of bugs both usrsocktest and nuttx. > > > > > > I will send PRs later. > > > > > > > > > > > > Regards, > > > > > > Masayuki > > > > > > > > > > > > >
Re: Usrsocktest app example fails
Oleg, try this PR: https://github.com/apache/incubator-nuttx/pull/354 with Masayuki and my patch, all test in usrsocktest should pass now. Actually, all fail is very minor: 1.Set the different errno 2.Foget to check NULL pointer 3.Don't zero the sockaddr padding bytes ,usrsock work well very even without these patch. On Fri, Feb 21, 2020 at 4:17 PM Oleg Evseev wrote: > > Hi Masayuki, > > Thanks for the work! Looking forward to new PRs. > > пт, 21 февр. 2020 г. в 08:42, Ishikawa, Masayuki (SHES) < > masayuki.ishik...@sony.com>: > > > Hi, Oleg, > > > > > > > > Though I am not an author of the code, > > > > I found a couple of bugs both usrsocktest and nuttx. > > > > I will send PRs later. > > > > > > > > Regards, > > > > Masayuki > > > > > > > >
Re: Usrsocktest app example fails
Turned on DEBUG_ASSERTIONS, DEBUG_NET_ERROR=y, DEBUG_NET_INFO=y, DEBUG_NET_WARN=y, left only WakeWithSignal test in usrsocktest example, got hardfault in debug assertion somewhere in semaphores nsh> Starting unit-tests... Testing group "WakeWithSignal" => usrsockdev_open: opening /dev/usrsock usrsockdev_pollnotify: Report events: 01 usrsock_event: events: 8000 socket_event: request completed. usrsockdev_pollnotify: Report events: 01 usrsockdev_close: closing /dev/usrsock usrsock_event: events: 0002 connect_event: socket aborted. usrsock_close: usockid=1; already closed. usrsockdev_open: opening /dev/usrsock usrsockdev_pollnotify: Report events: 01 usrsock_event: events: 8000 socket_event: request completed. usrsockdev_pollnotify: Report events: 01 usrsock_event: events: 8000 socket_event: request completed. usrsockdev_pollnotify: Report events: 01 usrsock_event: events: 8000 socket_event: request completed. usrsockdev_pollnotify: Report events: 01 usrsock_event: events: 8000 socket_evenup_assert: Assertion failed at file:semaphore/sem_holder.c line: 128 task: usrsocktest on attempt blocking connect do_usrsock_blocking_close_thread: /* Attempt blocking connect. */ ret = connect(test_sd[tidx], (FAR const struct sockaddr *), sizeof(addr)); -> usrsock_connect: /* Wait for completion of request (or signal). */ ret = net_lockedwait(); чт, 20 февр. 2020 г. в 13:19, Oleg Evseev : > Hi all, > > Trying to run usrsocktest example from app: > [image: изображение.png] > > 1) first two failed test in NoBlockRecv and BlockRecv fail because > ret = recvfrom(sd, data, datalen, 0, (FAR struct sockaddr > *), ); > fills sin_zero in remoteaddr with some notzero values. > > [image: изображение.png] > 2) BasicGetSockName fails because usrsock_getsockname doesn't check addr > for not null, so test with NULL addr do not get expected error. > > 3) WakeWithSignal after this fails hangs up the app. > > I'm not blaming anyone and do not complain, please do not be offended. > Thanks for all this work, really, but I'm in deep wonder does anybody run > this example at least once before? I thought that usrsock is quite stable > and I would like to concentrate on cell modem driver development and not > the net/usrsock stack itself in which I have very little knowledge. > I'm still thinking that I've set something wrong, especially due to fact > that I'm playing with it through px4 project in fact (but using latest > original Nuttx). > > Thanks for any thoughts. > > -- > With regards, Oleg. >
Usrsocktest app example fails
Hi all, Trying to run usrsocktest example from app: [image: изображение.png] 1) first two failed test in NoBlockRecv and BlockRecv fail because ret = recvfrom(sd, data, datalen, 0, (FAR struct sockaddr *), ); fills sin_zero in remoteaddr with some notzero values. [image: изображение.png] 2) BasicGetSockName fails because usrsock_getsockname doesn't check addr for not null, so test with NULL addr do not get expected error. 3) WakeWithSignal after this fails hangs up the app. I'm not blaming anyone and do not complain, please do not be offended. Thanks for all this work, really, but I'm in deep wonder does anybody run this example at least once before? I thought that usrsock is quite stable and I would like to concentrate on cell modem driver development and not the net/usrsock stack itself in which I have very little knowledge. I'm still thinking that I've set something wrong, especially due to fact that I'm playing with it through px4 project in fact (but using latest original Nuttx). Thanks for any thoughts. -- With regards, Oleg.