qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qemu-arm-static] timer_delete issue from Qemu 5.0.0 onwards


From: Jon Alduan
Subject: Re: [qemu-arm-static] timer_delete issue from Qemu 5.0.0 onwards
Date: Tue, 19 Jul 2022 13:57:58 +0200

Hello Peter,

this is not what I expected. I did the same as you again to be sure I was not missing something. but I get the same bad result (see below)
Are you using qemu-arm as static bin or qemu-arm as dynamic bin?

I also tested it on an another machine with another Kernel version, same result.
So, what is the difference between your environment and mine?
I send you my binary, so that you can test it directly on your machine. If it works, the issue comes within the compile phase.

Thank you for your support, again.

Best regards
Jon

$#/home/test_qemu_timer/src# arm-linux-gnueabihf-gcc -O2 -o timertest testTimer.cpp -static -pthread -lrt
testTimer.cpp: In function ‘void sig_alarm(int, siginfo_t*, void*)’:
testTimer.cpp:105:35: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘timer_t’ {aka ‘void
’} [-Wformat=]
  105 |     printf("signal from alarm %d %d %X\n", info->si_value.sival_int, m_tid[info->si_value.sival_int], info->si_value.sival_ptr);
      |                                  ~^                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                   |                                                                |
      |                                   int                                                              timer_t {aka void*}
      |                                  %p
testTimer.cpp:105:38: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 4 has type ‘void*’ [-Wformat=]
  105 |     printf("signal from alarm %d %d %X\n", info->si_value.sival_int, m_tid[info->si_value.sival_int], info->si_value.sival_ptr);
      |                                     ~^                                                                ~~~~~~~~~~~~~~~~~~~~~~~~
      |                                      |
     |
      |                                      unsigned int
     void*
      |                                     %p
testTimer.cpp: In function ‘void create_alarm(int, int)’:
testTimer.cpp:131:30: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘timer_t’ {aka ‘void
’} [-Wformat=]
  131 |     printf("Create timer %d %d\n", m_iNr, tid);
      |                             ~^            ~~~
      |                              |            |
      |                              int          timer_t {aka void*}
      |                             %p
testTimer.cpp: In function ‘void delete_alarm(int)’:
testTimer.cpp:143:30: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘timer_t’ {aka ‘void
’} [-Wformat=]
  143 |     printf("Remove timer %d %d\n", nr, m_tid[nr]);
      |                             ~^         ~~~~~~~~~
      |                              |                 |
      |                              int               timer_t {aka void*}
      |                             %p
$#/home/test_qemu_timer/src# ls -l
total 764
-rw-r--r-- 1 root root    116 Jul 15 18:16 CMakeLists.txt
-rw-r--r-- 1 root root   4269 Jul  6 00:12 testTimer.cpp
-rwxr-xr-x 1 root root 766532 Jul 19 13:31 timertest
$/home/jon/test_qemu_timer/src# qemu-arm-static_ -version
qemu-arm version 5.2.0 (Debian 1:5.2+dfsg-9ubuntu3.3)
Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers
$#/home/test_qemu_timer/src# qemu-arm-static_ -L ../ timertest
Create timer 0 212795392
Create timer 1 212795392
Create timer 2 212795393
Create timer 3 212795394
Create timer 4 212795395
thread0: started
thread0: saw 0 alarms from 0
thread1: started
thread2: started
thread3: started
thread4: started
thread5: started
thread6: started
thread7: started
thread8: started
thread9: started
signal from alarm 0 212795392 0
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
signal from alarm 0 212795392 0
signal from alarm 1 212795392 1
signal from alarm 3 212795394 3
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
signal from alarm 0 212795392 0
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
Remove timer 0 212795392
signal from alarm 0 0 0
Error, already deleted
signal from alarm 2 212795393 2
signal from alarm 3 212795394 3
signal from alarm 4 212795395 4
signal from alarm 0 0 0
Error, already deleted
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
signal from alarm 0 0 0
Error, already deleted
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
signal from alarm 3 212795394 3
signal from alarm 0 0 0
Error, already deleted
signal from alarm 2 212795393 2
Remove timer 1 212795392
signal from alarm 4 212795395 4
^C
$#/home/test_qemu_timer/src# qemu-arm-static_ timertest
Create timer 0 212795392
Create timer 1 212795392
Create timer 2 212795393
Create timer 3 212795394
Create timer 4 212795395
thread0: started
thread0: saw 0 alarms from 0
thread1: started
thread2: started
thread3: started
thread4: started
thread5: started
thread6: started
thread7: started
thread8: started
thread9: started
signal from alarm 0 212795392 0
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
signal from alarm 0 212795392 0
signal from alarm 1 212795392 1
signal from alarm 4 212795395 4
signal from alarm 3 212795394 3
signal from alarm 2 212795393 2
signal from alarm 0 212795392 0
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
Remove timer 0 212795392
signal from alarm 0 0 0
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
Error, already deleted
signal from alarm 3 212795394 3
signal from alarm 0 0 0
Error, already deleted
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4
signal from alarm 0 0 0
Error, already deleted
signal from alarm 4 212795395 4
signal from alarm 3 212795394 3
signal from alarm 2 212795393 2
signal from alarm 0 0 0
Error, already deleted
signal from alarm 2 212795393 2
Remove timer 1 212795392
signal from alarm 4 212795395 4
signal from alarm 2 212795393 2
signal from alarm 3 212795394 3
signal from alarm 4 212795395 4
signal from alarm 2 212795393 2
signal from alarm 4 212795395 4





El lun, 18 jul 2022 a las 18:44, Peter Maydell (<peter.maydell@linaro.org>) escribió:
On Fri, 15 Jul 2022 at 17:18, Jon Alduan <jon.alduan@gmail.com> wrote:
> thanks for answering so fast.
> Attached a tarball file containing everything you need to reproduce it (If not, please let me know).

I can't repro this compiling your test from source, either with
a build of QEMU 5.0 or with current git:

$ arm-linux-gnueabihf-gcc -O2 -o /tmp/timertest src/testTimer.cpp
-static -pthread -lrt
$ ~/linaro/qemu-from-laptop/qemu/build/qemu-5.0/arm-linux-user/qemu-arm
/tmp/timertest
Create timer 0 536856
Create timer 1 537904
Create timer 2 537920
Create timer 3 537936
Create timer 4 537952
thread1: started
thread9: started
thread0: started
thread3: started
thread2: started
thread4: started
thread5: started
thread6: started
thread7: started
thread8: started
thread0: saw 0 alarms from 0
signal from alarm 0 536856 0
signal from alarm 2 537920 2
signal from alarm 4 537952 4
signal from alarm 0 536856 0
signal from alarm 1 537904 1
signal from alarm 4 537952 4
signal from alarm 3 537936 3
signal from alarm 2 537920 2
signal from alarm 0 536856 0
signal from alarm 2 537920 2
signal from alarm 4 537952 4
Remove timer 0 536856
signal from alarm 1 537904 1
signal from alarm 2 537920 2
signal from alarm 4 537952 4
signal from alarm 3 537936 3
signal from alarm 2 537920 2
signal from alarm 4 537952 4
signal from alarm 1 537904 1
signal from alarm 4 537952 4
signal from alarm 3 537936 3
signal from alarm 2 537920 2
signal from alarm 2 537920 2
signal from alarm 4 537952 4
signal from alarm 2 537920 2
signal from alarm 1 537904 1
Remove timer 1 537904
signal from alarm 3 537936 3
signal from alarm 4 537952 4
signal from alarm 2 537920 2
signal from alarm 4 537952 4
signal from alarm 3 537936 3
signal from alarm 2 537920 2
signal from alarm 4 537952 4
^C

thanks
-- PMM


--
j.A

reply via email to

[Prev in Thread] Current Thread [Next in Thread]