GUIDINGLI commented on pull request #5539:
URL: https://github.com/apache/incubator-nuttx/pull/5539#issuecomment-1046649522
@masayuki2009
Can I report a hang bug for you ?
When I run your testcase, I find another problem.
Take cmd_md5 as a loop, take cmd_free as a loop.
Run both them in bg.
Then after about half an hour, the system stuck.
ligd@Opt:~/platform/mainline/nuttx$ qemu-system-arm -net nic -net
user,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:10021-10.0.2.15:21,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001
-M sabrelite -smp 4 -kernel ./nuttx -nographic
NuttShell (NSH) NuttX-10.2.0
nsh> nfsmount 10.221.68.177 /mnt/nfs /home/ligd/nfsserver
nsh>
nsh>
nsh> md5 -f /mnt/nfs/bl.mp3 &
md5 [8:100]
nsh> free &
free [9:100]
nsh> total used free largest nused nfree
Umem: 1064999840 36064 1064963776 1064963776 89 1
total used free largest nused nfree
Umem: 1064999840 35936 1064963904 1064963872 88 2
total used free largest nused nfree
Umem: 1064999840 35936 1064963904 1064963776 88 2
total used free largest nused nfree
Umem: 1064999840 35936 1064963904 1064963776 88 2
total used free largest nused nfree
Umem: 1064999840 36064 1064963776 1064963776 89 1
5ca4b22ff848cd393e3e289368a5139f
total used free largest nused nfree
Umem: 1064999840 35584 1064964256 1064963872 84 3
total used free largest nused nfree
Umem: 1064999840 36064 1064963776 1064963776 89 1
total used free largest nused nfree
Umem: 1064999840 35936 1064963904 1064963776 88 2
total used free largest nused nfree
Umem: 1064999840 36064 1064963776 1064963776 89 1
ligd@Opt:~/platform/mainline/apps$ git diff
diff --git a/nshlib/nsh_codeccmd.c b/nshlib/nsh_codeccmd.c
index 7f21accd3..a62da05a0 100644
--- a/nshlib/nsh_codeccmd.c
+++ b/nshlib/nsh_codeccmd.c
@@ -573,7 +573,11 @@ int cmd_base64decode(FAR struct nsh_vtbl_s *vtbl, int
argc, char **argv)
#ifdef HAVE_CODECS_HASH_MD5
int cmd_md5(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
- return cmd_codecs_proc(vtbl, argc, argv, CODEC_MODE_HASH_MD5, md5_cb);
+ while (1)
+ {
+ cmd_codecs_proc(vtbl, argc, argv, CODEC_MODE_HASH_MD5, md5_cb);
+ usleep(100 * 1000);
+ }
}
#endif
diff --git a/nshlib/nsh_mmcmds.c b/nshlib/nsh_mmcmds.c
index 898e127fd..d6ef0df87 100644
--- a/nshlib/nsh_mmcmds.c
+++ b/nshlib/nsh_mmcmds.c
@@ -39,7 +39,11 @@
int cmd_free(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
- return nsh_catfile(vtbl, argv[0], CONFIG_NSH_PROC_MOUNTPOINT "/meminfo");
+ while (1)
+ {
+ nsh_catfile(vtbl, argv[0], CONFIG_NSH_PROC_MOUNTPOINT "/meminfo");
+ usleep(100 * 1000);
+ }
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]