Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?
I just tried running the program with Valgrind on a machine with Debian 12 (bookworm). It ships with valgrind-3.19.0. I did exactly the same and the issue is gone. So I think the issue can be considered closed. Also, on the "bugs" you mentioned in the previous email. Note that this project is still under development and its README.md targets Debian only. The issues you are facing are either because it is still under development or you are not using Debian to build it. Alex On Sun, 2023-06-25 at 08:34 -0700, John Reiser wrote: > > Upgrade valgrind *TODAY*. The current version is valgrind-3.21.0. > > On a RaspberryPi model 3 in 32-bit mode (armhf) running Debian 11 > (bullseye), > then "apt-get install valgrind" installs valgrind-3.16.1 which is > much better > than the valgrind-3.7.0 which complained "not implemented" for the > "pac" app. > > On the same machine (1 GiB RAM, 4 CPU), valgrind-3.22.0.GIT can be > built > from source git://sourceware.org/git/valgrind.git. It takes less > than > one hour if you invoke "make -j4" to use all 4 CPU; no dynamic paging > is used. > > > > ___ > Valgrind-users mailing list > Valgrind-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/valgrind-users ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?
Upgrade valgrind *TODAY*. The current version is valgrind-3.21.0. On a RaspberryPi model 3 in 32-bit mode (armhf) running Debian 11 (bullseye), then "apt-get install valgrind" installs valgrind-3.16.1 which is much better than the valgrind-3.7.0 which complained "not implemented" for the "pac" app. On the same machine (1 GiB RAM, 4 CPU), valgrind-3.22.0.GIT can be built from source git://sourceware.org/git/valgrind.git. It takes less than one hour if you invoke "make -j4" to use all 4 CPU; no dynamic paging is used. ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?
I am using Debian on RaspberryPi and everything is from the official apt package manager. Hardware architecture: armv7l GNU/Linux OS version:Raspbian GNU/Linux 11 (bullseye) Libmicrohttpd: stable, 0.9.72-2 armhf Valgrind: valgrind-3.7.0 Upgrade valgrind *TODAY*. The current version is valgrind-3.21.0. Valgrind-3.7.0 was released in November 2011: commit 261bffdb4c2a52014ee10b4d68a75db0ec5834e60. It is a waste of everyone's time to chase "not implemented" in software that is over 11 years old and has been updated frequently since then. re: https://github.com/alex-lt-kong/public-address-client Fix your bugs: 1. README.md: libao-devel must be installed, else "#include ao/ao.h" fails. 2. gcc ./src/utils.c -c -O2 -Wall -pedantic -Wextra -Wc++-compat -fsanitize=address -g ./src/utils.c: In function ‘handle_sound_name_queue’: ./src/utils.c:155:75: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=] 155 | syslog(LOG_INFO, "Currently playing: [%s], current sound_queue_size: %d", | ~^ | | | int | %ld 156 |sound_realpath, qs); |~~ || |size_t {aka long unsigned int} ./src/utils.c:169:1: warning: control reaches end of non-void function [-Wreturn-type] 169 | } | ^ 3. libasan is required. 4. libasan must be first in the list presented to /usr/bin/ld, else it does not work correctly: "ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD." - pac.out: $(SRC_DIR)/main.c queue.o utils.o $(CC) -lasan $(SRC_DIR)/main.c queue.o utils.o -o pac.out $(CFLAGS) $(LDFLAGS) $(SANITIZER) - -- ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?
On 2023/06/25 2:09, mamsds wrote: Hi John, I am using Debian on RaspberryPi and everything is from the official apt package manager. Hardware architecture: armv7l GNU/Linux OS version:Raspbian GNU/Linux 11 (bullseye) Libmicrohttpd: stable, 0.9.72-2 armhf Valgrind: valgrind-3.7.0 I can also share the code that I was testing: https://github.com/alex-lt-kong/public-address-client Exact invocation and surrounding output: # valgrind --leak-check=yes --log-file=/tmp/valgrind.rpt $HOME/bin/public-address-client/pac.out Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented [a lot more identical rows...] strace output: 3454 cacheflush(0x42714b70, 0x42714ca0, 0) = 0 3454 cacheflush(0x42714ca0, 0x42714d20, 0) = 0 3454 cacheflush(0x42714d20, 0x42714dec, 0) = 0 3454 cacheflush(0x42714df0, 0x42714f28, 0) = 0 3454 cacheflush(0x42714f28, 0x427150e0, 0) = 0 3454 getpid() = 3454 3454 write(1026, "==3454== \n", 10)= 10 3454 getpid() = 3454 3454 getpid() = 3454 3454 getpid() = 3454 3454 getpid() = 3454 3454 write(1026, "==3454== HEAP SUMMARY:\n==3454== "..., 170) = 170 3454 rt_sigprocmask(SIG_SETMASK, NULL, ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, NULL, ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, NULL, ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0 [The last row repeats a lot of times] I am not very sure on how to count twenty syscalls since the beginning of the error though. Please let me know if you notice any issues. I will leave the mail for a while then I will file a report to bugs.kde.org. Thanks, Alex On Fri, 2023-06-23 at 12:54 -0700, John Reiser wrote: ... each time a client makes a [HTTP] request, Valgrind complains "Error accepting connection: Function not implemented" and my program fails to handle the request as a result. Which versions of each of these pieces are you running: Libmicrohttpd, valgrind, hardware architecture, OS? Please give the exact copy+paste of the invocation of valgrind that fails, together with the output from Terminal that surrounds the complaint "Error accepting connection: Function not implemented". Please run under /usr/bin/strace, and report the twenty system calls that are run shortly before the complaint: strace -f -o strace.out valgrind ./my_app args... You may wish to compare versus the output from strace on the same command but without using 'valgrind'. Then the best way to gain attention of valgrind *developers* is to put all that info into a bug report at: https://bugs.kde.org/ , and post here in the mailing list the URL of the bug report that you created. I think it may be wiser to discuss the details in the web pub report mechanism. But for now, I have a question. - Does your program run without valgrind? (i.e. does it accept connection from outside?) If so, please capture the syscalls in that scenario and try capturing the syscalls when it accepts the connection. Compare that syscalls with the syscalls when your program is run under valgrind. Then you will see where your program's behavior under valgrind deviates from the normal flow. I *THINK* the issue is related to a possible timeout in the library which does not occur in the code usually and may not be handled very well. I have seen some cases where the slowdown under valgrind is like x20 and due to this, the ordinary program execution disrupted so much that the program bails out due to timeout. It occurs quite often of testing of thunderbird mail client, for example. Judicious use of larger timeout values often fixed the similar issues for me in the past. Given that you need to post so many contextual information, I think filing the bug to the kde bug reporting system would be wiser. Chiaki ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?
Hi John, I am using Debian on RaspberryPi and everything is from the official apt package manager. Hardware architecture: armv7l GNU/Linux OS version:Raspbian GNU/Linux 11 (bullseye) Libmicrohttpd: stable, 0.9.72-2 armhf Valgrind: valgrind-3.7.0 I can also share the code that I was testing: https://github.com/alex-lt-kong/public-address-client Exact invocation and surrounding output: # valgrind --leak-check=yes --log-file=/tmp/valgrind.rpt $HOME/bin/public-address-client/pac.out Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented Error accepting connection: Function not implemented [a lot more identical rows...] strace output: 3454 cacheflush(0x42714b70, 0x42714ca0, 0) = 0 3454 cacheflush(0x42714ca0, 0x42714d20, 0) = 0 3454 cacheflush(0x42714d20, 0x42714dec, 0) = 0 3454 cacheflush(0x42714df0, 0x42714f28, 0) = 0 3454 cacheflush(0x42714f28, 0x427150e0, 0) = 0 3454 getpid() = 3454 3454 write(1026, "==3454== \n", 10)= 10 3454 getpid() = 3454 3454 getpid() = 3454 3454 getpid() = 3454 3454 getpid() = 3454 3454 write(1026, "==3454== HEAP SUMMARY:\n==3454== "..., 170) = 170 3454 rt_sigprocmask(SIG_SETMASK, NULL, ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, NULL, ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, NULL, ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0 3454 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0 [The last row repeats a lot of times] I am not very sure on how to count twenty syscalls since the beginning of the error though. Please let me know if you notice any issues. I will leave the mail for a while then I will file a report to bugs.kde.org. Thanks, Alex On Fri, 2023-06-23 at 12:54 -0700, John Reiser wrote: > > ... each time a client makes a [HTTP] request, Valgrind complains > > "Error > > accepting connection: Function not implemented" and my program > > fails to > > handle the request as a result. > > Which versions of each of these pieces are you running: > Libmicrohttpd, valgrind, > hardware architecture, OS? > > Please give the exact copy+paste of the invocation of valgrind that > fails, > together with the output from Terminal that surrounds the complaint > "Error accepting connection: Function not implemented". > > Please run under /usr/bin/strace, and report the twenty system calls > that are run > shortly before the complaint: > strace -f -o strace.out valgrind ./my_app args... > You may wish to compare versus the output from strace on the same > command > but without using 'valgrind'. > > Then the best way to gain attention of valgrind *developers* > is to put all that info into a bug report at: > https://bugs.kde.org/ , > and post here in the mailing list the URL of the bug report that you > created. > ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] "Error accepting connection: Function not implemented", is this expected?
... each time a client makes a [HTTP] request, Valgrind complains "Error accepting connection: Function not implemented" and my program fails to handle the request as a result. Which versions of each of these pieces are you running: Libmicrohttpd, valgrind, hardware architecture, OS? Please give the exact copy+paste of the invocation of valgrind that fails, together with the output from Terminal that surrounds the complaint "Error accepting connection: Function not implemented". Please run under /usr/bin/strace, and report the twenty system calls that are run shortly before the complaint: strace -f -o strace.out valgrind ./my_app args... You may wish to compare versus the output from strace on the same command but without using 'valgrind'. Then the best way to gain attention of valgrind *developers* is to put all that info into a bug report at: https://bugs.kde.org/ , and post here in the mailing list the URL of the bug report that you created. -- ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
[Valgrind-users] "Error accepting connection: Function not implemented", is this expected?
Hi, I am trying to use Valgrind to check my program that uses GNU's [Libmicrohttpd](https://www.gnu.org/software/libmicrohttpd/) to handle HTTP requests. However, each time a client makes a request, Valgrind complains "Error accepting connection: Function not implemented" and my program fails to handle the request as a result. Is this expected? If the answer is yes, is there anything I can do to make Valgrind work? Thanks, Best regards, Alex Kong ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users