tanelpoder / 0xtools

0x.Tools: X-Ray vision for Linux systems
https://0x.tools
GNU General Public License v2.0
1.22k stars 99 forks source link

KeyError getting syscall_id #24

Closed leszekhanusz closed 2 years ago

leszekhanusz commented 2 years ago
$ sudo ./bin/psn -G syscall,wchan

Linux Process Snapper v1.1.0 by Tanel Poder [https://0x.tools]
Sampling /proc/syscall, wchan, stat for 5 seconds...
Traceback (most recent call last):
  File "./bin/psn", line 375, in <module>
    main()
  File "./bin/psn", line 301, in main
    task_samples = [s.sample(event_time, pid, task) for s in sources.keys() if s.task_level == True]
  File "/home/delijn/0xtools/lib/0xtools/proc.py", line 108, in sample
    return [create_row_sample(rs) for rs in raw_samples]
  File "/home/delijn/0xtools/lib/0xtools/proc.py", line 104, in create_row_sample
    r =  [event_time, pid, task] + [convert(full_sample[idx]) for idx, convert in self.schema_extract]
  File "/home/delijn/0xtools/lib/0xtools/proc.py", line 369, in <lambda>
    ('syscall',    str,  0, lambda sn: syscall_id_to_name[sn]),  # convert syscall_id via unistd_64.h into call name
KeyError: '1879048192'
tanelpoder commented 2 years ago

Interesting, I converted the number to hex and it shows this:

>>> print("%x" % 1879048192)
70000000

Possibly a "read consistency" bug in the Linux /proc/PID/syscall code. I see funky values in other fields (like WCHAN) sometimes, but I just display these values and don't try to do a hashtable lookup with the value.

Can you easily reproduce this at will?

What's the CPU architecture and exact kernel version as shown by uname -a

I think I'll change the code to just show N/A or "error" when the /proc filesystem gives bad value as the syscall number.

leszekhanusz commented 2 years ago

Can you easily reproduce this at will?

yes, it crashes the same way every time

What's the CPU architecture and exact kernel version as shown by uname -a

This is actually an old realtime kernel on a quad-core for which I was tasked to solve performance problems

$ uname -a
Linux radioserver-delijn-master 3.8.13-rtai #2 SMP Tue Jun 21 10:10:47 CEST 2016 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/cpuinfo | grep "model name"
model name  : Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
model name  : Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
model name  : Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
model name  : Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz

I think I'll change the code to just show N/A or "error" when the /proc filesystem gives bad value as the syscall number.

:+1:

leszekhanusz commented 2 years ago

Example of syscall values:

$ sudo cat /proc/**/syscall
-1 0xffff88006e94bf58 0x0
23 0x1a 0x7fff53708c80 0x0 0x0 0x0 0x1 0x7fff53708c68 0x7f8601951693
23 0x5 0x7fff53708480 0x0 0x0 0x7fff537085c0 0x0 0x7fff53706560 0x7f8601951693
-1 0xffff88006f887f58 0x0
-1 0xffff880070117f58 0x0
-1 0xffff880071823f58 0x0
23 0x5 0x7fff0d4a9b00 0x7fff0d4a9b80 0x7fff0d4a9c00 0x7fff0d4a9c80 0x8 0x7fff0d49da40 0x7f5627cd46b3
23 0x7 0x7f8c584ffc90 0x0 0x0 0x0 0x0 0x7fff11a92a48 0x7f8c54f48693
7 0x7fffba2a9270 0x5 0xffffffffffffffff 0x0 0x0 0x1 0x7fffba2a91c8 0x7f6a27cff958
0 0x0 0x7fffa4f4b72c 0x1 0x7fffa4f4ac90 0x7fffa4f4adc0 0x1 0x7fffa4f4aac8 0x7fddf9efff30
-1 0xffff880071847f58 0x0
0 0x0 0x7fff091d1b2c 0x1 0x7fff091d1090 0x7fff091d11c0 0x1 0x7fff091d0ec8 0x7f1399faef30
0 0x0 0x7fffd0c7089c 0x1 0x7fffd0c6fe00 0x7fffd0c6ff30 0x1 0x7fffd0c6fc38 0x7fb93eb93f30
7 0x151c9e0 0x3 0x3e8 0x40 0x151c7c0 0x4bb 0x7fff7f29b850 0x7feee099d958
0 0x0 0x7fffde69f3bc 0x1 0x7fffde69e920 0x7fffde69ea50 0x1 0x7fffde69e758 0x7fbb7cdf8f30
7 0x151d380 0x2 0x3e8 0x40 0x151c7c0 0x4bf 0x7fff7f29b7b0 0x7feee099d958
0 0x0 0x7fff8479202c 0x1 0x7fff84791590 0x7fff847916c0 0x1 0x7fff847913c8 0x7f6584660f30
23 0x6 0x7fffb0067340 0x0 0x0 0x0 0x0 0x7fffb0067138 0x7f524bab0693
35 0x7fff43c3cd50 0x7fff43c3cd50 0x0 0x8 0x7fff43c3cbb0 0x1 0x7fff43c3cba8 0x7f4d998f4050
35 0x7fff61012310 0x7fff61012310 0x0 0x8 0x7fff61012170 0x0 0x7fff61012248 0x7f96e9950050
35 0x7fff46d5c170 0x0 0x9 0x0 0x1 0x21 0x7fff46d5c0e8 0x7f742b72b050
7 0x15fadc0 0x3 0x6ddca4 0x0 0x0 0x50f 0x7fff36d6e958 0x7f22b207d993
-1 0xffff88007185ff58 0x0
-1 0xffff88006423ff58 0x0
-1 0xffff88007186bf58 0x0
7 0x21ed860 0x6 0x1a4 0x40 0x21ea410 0x58f 0x7fffbdea8658 0x7f05a9257958
61 0xffffffffffffffff 0x0 0x0 0x0 0x0 0x7f24545ef700 0x7fffe575b150 0x7f2453cc8be4
0 0x8 0x7f05aa490000 0x1000 0x0 0x1 0x0 0x7fffbdea85b8 0x7f05a9255f30
7 0x7fffbdea87e0 0x1 0xffffffffffffffff 0x40 0x0 0x0 0x7fffbdea86b8 0x7f05a9257958
45 0xa 0x7f05a82b61c0 0x3ffff 0x0 0x7fffbdea8830 0x7fffbdea882c 0x7fffbdea8648 0x7f05a9264363
1879048192 0x4808 0x7fffaa5f3390 0x7fffaa5f3340 0x7ff37af71b80 0x7e5 0x7fffaa5f3390 0x7fffaa5f32c0 0x7ff37aeec569
7 0x1f4fc00 0x2 0x3e8 0x40 0x1f4fc70 0x5d0 0x7fff2f0490d0 0x7f4e6cd91958
-1 0xffff88007186ff58 0x0
23 0x1 0x0 0x0 0x0 0x7fffc4fc5cc0 0x3f52 0x7fffc4fc5a98 0x7f3b7341d6b3
-1 0xffff880071883f58 0x0
-1 0xffff880071903f58 0x0
-1 0xffff880071907f58 0x0
61 0xffffffffffffffff 0x7fff96ad9468 0xa 0x0 0x12a2948 0x1 0x7fff96ad9370 0x7f7663ffec6e
-1 0xffff880071913f58 0x0
23 0x17 0x7fffefdf4100 0x7fffefdf4180 0x7fffefdf4200 0x0 0x11 0x7fffefdf4018 0x7f40f028d693
-1 0xffff88007191ff58 0x0
-1 0xffff88007194ff58 0x0
-1 0xffff88007195bf58 0x0
-1 0xffff88007195ff58 0x0
-1 0xffff880071967f58 0x0
35 0x7fff8fdd4340 0x0 0x0 0x7fff8fdd40d0 0x0 0x0 0x7fff8fdd4338 0x7fe513499050
-1 0xffff8800719a3f58 0x0
23 0x3 0x7fff310784b0 0x0 0x0 0x7fff310785b0 0x1f 0x7fff31078148 0x7f20f6a9f693
-1 0xffff88002f24bf58 0x0
-1 0xffff88002ec2bf58 0x0
-1 0xffff88002e98ff58 0x0
-1 0xffff8800719bff58 0x0
-1 0xffff88002e973f58 0x0
-1 0xffff88002e99bf58 0x0
-1 0xffff88002fd8ff58 0x0
-1 0xffff88002ec6bf58 0x0
-1 0xffff88002ef7bf58 0x0
-1 0xffff8800719c7f58 0x0
-1 0xffff8800723e7f58 0x0
-1 0xffff8800719f7f58 0x0
-1 0xffff88006f92ff58 0x0
7 0x7fffeb4fb670 0x1 0xffffffffffffffff 0x0 0x0 0x1 0x7fffeb4fb638 0x7f9e928d2958
-1 0xffff88002f90ff58 0x0
23 0xb 0x7f9e967f5470 0x7f9e967f5450 0x0 0x0 0x0 0x7fffeb4fb428 0x7f9e928d7693
61 0xffffffffffffffff 0x7fff7b9d7cf8 0xa 0x0 0x1b71348 0x0 0x7fff7b9d7c00 0x7fe98cd2bc6e
-1 0xffff880071a27f58 0x0
running
-1 0xffff880071a33f58 0x0
-1 0xffff88002f813f58 0x0
-1 0xffff88002fef7f58 0x0
-1 0xffff880071a37f58 0x0
-1 0xffff880071b03f58 0x0
-1 0xffff880071b07f58 0x0
-1 0xffff880071b0bf58 0x0
-1 0xffff880071b0ff58 0x0
-1 0xffff880071477f58 0x0
-1 0xffff8800723fbf58 0x0
-1 0xffff88007149ff58 0x0
-1 0xffff880056107f58 0x0
-1 0xffff88005611bf58 0x0
23 0x7 0x7fff5d9f9eb0 0x7fff5d9f9f30 0x7fff5d9f9fb0 0x0 0x0 0x7fff5d9f8c58 0x7f394dcae693
232 0xa 0x7fff0ecc134c 0x8 0xffffffff 0x0 0x0 0x7fff0ecc03c0 0x7fa1a3c599e3
-1 0xffff88005615ff58 0x0
-1 0xffff88005618bf58 0x0
-1 0xffff88005619bf58 0x0
61 0xffffffff 0x7fff5a49c1cc 0x0 0x0 0x0 0x7f54915d8700 0x7fff5a49c0b8 0x7f54910c2d1a
35 0x7fff4ab10360 0x7fff4ab10370 0x7fff4ab10370 0x7fff4ab10130 0x0 0x0 0x7fff4ab10310 0x7feb7423e52d
-1 0xffff88006f8ebf58 0x0
-1 0xffff880064337f58 0x0
61 0xffffffffffffffff 0x7fff96ad9138 0x0 0x0 0x1145a08 0x0 0x7fff96ad9000 0x7f7663ffec6e
0 0x4 0x16771c0 0x1d 0x2020372e32202035 0xa77657461477265 0x383834200a656369 0x7fff8f451770 0x7fa165e70f30
-1 0xffff880064227f58 0x0
232 0x4 0x7fff0ecc1038 0x4 0xffffffff 0x0 0x1 0x7fff0ecbea68 0x7fa1a3c599e3
-1 0xffff8800561d3f58 0x0
-1 0xffff88002f667f58 0x0
-1 0xffff8800561ebf58 0x0
-1 0xffff880071807f58 0x0
-1 0xffff88002fb93f58 0x0
-1 0xffff880056207f58 0x0
-1 0xffff8800562c7f58 0x0
232 0x4 0x7fff0ecc1038 0x4 0xffffffff 0x7fa1a3f1d770 0x1 0x7fff0ecc0ec8 0x7fa1a3c599e3
-1 0xffff8800562d3f58 0x0
-1 0xffff88005eafbf58 0x0
-1 0xffff880056313f58 0x0
-1 0xffff88007022ff58 0x0
-1 0xffff880070007f58 0x0
-1 0xffff8800643e3f58 0x0
-1 0xffff88002f733f58 0x0
-1 0xffff88002f76bf58 0x0
-1 0xffff88002f75bf58 0x0
23 0x6 0x7fff5f8c9090 0x7fff5f8c9110 0x7fff5f8c9190 0x0 0x0 0x7fff5f8c7e38 0x7f2d80c79693
-1 0xffff88006f2f3f58 0x0
-1 0xffff88006f843f58 0x0
-1 0xffff88006f847f58 0x0
-1 0xffff88006f9e7f58 0x0
-1 0xffff880071817f58 0x0
-1 0xffff8800563c7f58 0x0
-1 0xffff8800563cff58 0x0
-1 0xffff88007181bf58 0x0
-1 0xffff88007181ff58 0x0
0 0x3 0x1cf6000 0x8000 0x2 0x3 0x1000000 0x7fffc3224c48 0x7f26c7cb9f30
leszekhanusz commented 2 years ago
$ sudo cat /proc/**/task/**/syscall
-1 0xffff88006e94bf58 0x0
23 0x1a 0x7fff53708c80 0x0 0x0 0x0 0x1 0x7fff53708c68 0x7f8601951693
23 0x5 0x7fff53708480 0x0 0x0 0x7fff537085c0 0x0 0x7fff53708410 0x7f8601951693
-1 0xffff88006f887f58 0x0
-1 0xffff880070117f58 0x0
-1 0xffff880071823f58 0x0
23 0x5 0x7fff0d4a9b00 0x7fff0d4a9b80 0x7fff0d4a9c00 0x7fff0d4a9c80 0x8 0x7fff0d49da40 0x7f5627cd46b3
23 0x6 0x7f56256a0410 0x7f56256a0490 0x7f56256a0510 0x0 0x8 0x7f5625694000 0x7f5627cd46b3
23 0x7 0x7f8c584ffc90 0x0 0x0 0x0 0x0 0x7fff11a92a48 0x7f8c54f48693
7 0x7fffba2a9270 0x5 0xffffffffffffffff 0x0 0x0 0x1 0x7fffba2a91c8 0x7f6a27cff958
0 0x0 0x7fffa4f4b72c 0x1 0x7fffa4f4ac90 0x7fffa4f4adc0 0x1 0x7fffa4f4aac8 0x7fddf9efff30
-1 0xffff880071847f58 0x0
0 0x0 0x7fff091d1b2c 0x1 0x7fff091d1090 0x7fff091d11c0 0x1 0x7fff091d0ec8 0x7f1399faef30
0 0x0 0x7fffd0c7089c 0x1 0x7fffd0c6fe00 0x7fffd0c6ff30 0x1 0x7fffd0c6fc38 0x7fb93eb93f30
7 0x151c9e0 0x3 0x3e8 0x40 0x151c7c0 0x4bb 0x7fff7f29b8b0 0x7feee099d958
0 0x0 0x7fffde69f3bc 0x1 0x7fffde69e920 0x7fffde69ea50 0x1 0x7fffde69e758 0x7fbb7cdf8f30
7 0x151d380 0x2 0x3e8 0x40 0x151c7c0 0x4bf 0x7fff7f29b8f0 0x7feee099d958
0 0x0 0x7fff8479202c 0x1 0x7fff84791590 0x7fff847916c0 0x1 0x7fff847913c8 0x7f6584660f30
23 0x6 0x7fffb0067340 0x0 0x0 0x0 0x0 0x7fffb0067138 0x7f524bab0693
35 0x7fff43c3cd50 0x7fff43c3cd50 0x0 0x8 0x7fff43c3cbb0 0x1 0x7fff43c3cba8 0x7f4d998f4050
35 0x7fff61012310 0x7fff61012310 0x0 0x8 0x7fff61012170 0x0 0x7fff61012248 0x7f96e9950050
35 0x7fff46d5c170 0x0 0x9 0x0 0x1 0x21 0x7fff46d5c0e8 0x7f742b72b050
7 0x15fadc0 0x3 0x6dde18 0x0 0x0 0x50f 0x7fff36d6e9e0 0x7f22b207d993
7 0x7f22a40010e0 0x3 0xffffffffffffffff 0xfffffff0 0x0 0x51e 0x7f22ac255c90 0x7f22b207d993
-1 0xffff88007185ff58 0x0
-1 0xffff88006423ff58 0x0
-1 0xffff88007186bf58 0x0
7 0x21ed860 0x6 0x154 0x40 0x21ea410 0x58f 0x7fffbdea8658 0x7f05a9257958
61 0xffffffffffffffff 0x0 0x0 0x0 0x0 0x7f24545ef700 0x7fffe575b150 0x7f2453cc8be4
0 0x8 0x7f05aa490000 0x1000 0x0 0x1 0x0 0x7fffbdea85b8 0x7f05a9255f30
7 0x7fffbdea87e0 0x1 0xffffffffffffffff 0x40 0x0 0x0 0x7fffbdea8668 0x7f05a9257958
45 0xa 0x7f05a82b61c0 0x3ffff 0x0 0x7fffbdea8830 0x7fffbdea882c 0x7fffbdea8648 0x7f05a9264363
1879048192 0x4808 0x7fffaa5f3390 0x7fffaa5f3340 0x7ff37af71b80 0x7e5 0x7fffaa5f3390 0x7fffaa5f3310 0x7ff37aeec569
1879048192 0x4808 0x7ff37b80de90 0x7ff37b80de40 0x7ff37b80de90 0x7ff37b80de90 0x7ff37b80de90 0x7ff37b80cfd0 0x7ff37aeec569
23 0x6 0x7ff37b803950 0x0 0x0 0x7ff37b8039d0 0x50 0x7ff37b803460 0x7ff37aee96b3
1879048192 0x4808 0x7ff37b7ffa60 0x7ff37b7ffa10 0x7ff37b7ffa60 0x7ff37b7ffa60 0x7ff37b7ffa60 0x7ff37b7fee28 0x7ff37aeec569
23 0x5 0x7ff37b7fbdb0 0x0 0x0 0x7ff37b7fbe30 0x7ff37b7fb6c0 0x7ff37b7fb148 0x7ff37aee96b3
7 0x1f4fc00 0x2 0x3e8 0x40 0x1f4fc70 0x5d0 0x7fff2f048f98 0x7f4e6cd91958
-1 0xffff88007186ff58 0x0
23 0x1 0x0 0x0 0x0 0x7fffc4fc5cc0 0x3f52 0x7fffc4fc5ae8 0x7f3b7341d6b3
202 0x1de1644 0x80 0x2642119 0x0 0x0 0x132108c 0x7f3b72491b08 0x7f3b73b06d84
23 0x1 0x7f3b71c90da0 0x0 0x0 0x0 0x4000001 0x7f3b71c8f488 0x7f3b7341d6b3
0 0x3 0x7f3b72cc85a0 0xfff 0x0 0x1de1640 0x4000001 0x7f3b7148fd78 0x7f3b73b09d2d
-1 0xffff880071883f58 0x0
-1 0xffff880071903f58 0x0
-1 0xffff880071907f58 0x0
61 0xffffffffffffffff 0x7fff96ad9468 0xa 0x0 0x12a2948 0x1 0x7fff96ad9370 0x7f7663ffec6e
-1 0xffff880071913f58 0x0
23 0x17 0x7fffefdf4100 0x7fffefdf4180 0x7fffefdf4200 0x0 0x11 0x7fffefdf4018 0x7f40f028d693
-1 0xffff88007191ff58 0x0
-1 0xffff88007036ff58 0x0
-1 0xffff88007194ff58 0x0
-1 0xffff88007195bf58 0x0
-1 0xffff88007195ff58 0x0
-1 0xffff880071967f58 0x0
-1 0xffff8800719a3f58 0x0
23 0x3 0x7fff310784b0 0x0 0x0 0x7fff310785b0 0x1f 0x7fff31078148 0x7f20f6a9f693
-1 0xffff88002f24bf58 0x0
-1 0xffff88002ec2bf58 0x0
-1 0xffff88002e98ff58 0x0
-1 0xffff8800719bff58 0x0
-1 0xffff88002e973f58 0x0
-1 0xffff88002e99bf58 0x0
-1 0xffff88002fd8ff58 0x0
-1 0xffff88002ec6bf58 0x0
-1 0xffff88002ef7bf58 0x0
-1 0xffff8800719c7f58 0x0
-1 0xffff8800723e7f58 0x0
-1 0xffff8800719f7f58 0x0
7 0x7fffeb4fb670 0x1 0xffffffffffffffff 0x0 0x0 0x1 0x7fffeb4fb638 0x7f9e928d2958
-1 0xffff88002f90ff58 0x0
running
61 0xffffffffffffffff 0x7fff7b9d7cf8 0xa 0x0 0x1b6f1c8 0x0 0x7fff7b9d7c00 0x7fe98cd2bc6e
-1 0xffff880071a27f58 0x0
-1 0xffff88007029ff58 0x0
-1 0xffff880071a33f58 0x0
-1 0xffff88002f813f58 0x0
-1 0xffff88002fef7f58 0x0
-1 0xffff880071a37f58 0x0
-1 0xffff880071b03f58 0x0
-1 0xffff880071b07f58 0x0
-1 0xffff880071b0bf58 0x0
-1 0xffff880071b0ff58 0x0
-1 0xffff880071477f58 0x0
-1 0xffff8800723fbf58 0x0
-1 0xffff88007149ff58 0x0
-1 0xffff880056107f58 0x0
-1 0xffff88005611bf58 0x0
23 0x7 0x7fff5d9f9eb0 0x7fff5d9f9f30 0x7fff5d9f9fb0 0x0 0x0 0x7fff5d9f8c58 0x7f394dcae693
232 0xa 0x7fff0ecc134c 0x8 0xffffffff 0x0 0x0 0x7fff0ecc03c0 0x7fa1a3c599e3
-1 0xffff88005615ff58 0x0
-1 0xffff88005618bf58 0x0
-1 0xffff88005619bf58 0x0
35 0x7fff8ec8d0a0 0x0 0x0 0x7fff8ec8ce30 0x0 0x0 0x7fff8ec8d098 0x7eff7379d050
61 0xffffffff 0x7fff5a49c1cc 0x0 0x0 0x0 0x7f54915d8700 0x7fff5a49c0b8 0x7f54910c2d1a
35 0x7fff4ab10360 0x7fff4ab10370 0x7fff4ab10370 0x7fff4ab10130 0x0 0x0 0x7fff4ab10310 0x7feb7423e52d
35 0x7feb73e6fd90 0x7feb73e6fda0 0x7feb73e6fda0 0x7feb73e6fb60 0x0 0x0 0x7feb73e6fd50 0x7feb7423e52d
23 0x5 0x7feb7366edf0 0x0 0x0 0x7feb7366ee70 0x1 0x7feb7366eb88 0x7feb73f5d6b3
35 0x7feb6ae6de40 0x7feb6ae6de50 0x7feb6ae6de50 0x4000 0x0 0x0 0x7feb6ae6cd98 0x7feb7423e52d
35 0x7feb72e6da70 0x7feb72e6da80 0x7feb72e6da80 0x0 0x0 0x0 0x7feb72e6da78 0x7feb7423e52d
35 0x7feb7266cda0 0x7feb7266cdb0 0x7feb7266cdb0 0x0 0x0 0x1 0x7feb7266cb88 0x7feb7423e52d
35 0x7feb71e6bda0 0x7feb71e6bdb0 0x7feb71e6bdb0 0x0 0x0 0x1 0x7feb71e6bb88 0x7feb7423e52d
-1 0xffff88006f8ebf58 0x0
-1 0xffff880064337f58 0x0
61 0xffffffffffffffff 0x7fff96ad9138 0x0 0x0 0x11458c8 0x0 0x7fff96ad9040 0x7f7663ffec6e
0 0x4 0x16771c0 0x1d 0x2020372e32202035 0xa77657461477265 0x383834200a656369 0x7fff8f451770 0x7fa165e70f30
-1 0xffff880064227f58 0x0
232 0x4 0x7fff0ecc1038 0x4 0xffffffff 0x0 0x1 0x7fff0ecbea68 0x7fa1a3c599e3
-1 0xffff8800561d3f58 0x0
-1 0xffff88002f667f58 0x0
-1 0xffff8800561ebf58 0x0
-1 0xffff880071807f58 0x0
-1 0xffff88002fb93f58 0x0
-1 0xffff880056207f58 0x0
-1 0xffff8800562c7f58 0x0
232 0x4 0x7fff0ecc1038 0x4 0xffffffff 0x7fa1a3f1d770 0x1 0x7fff0ecc0ec8 0x7fa1a3c599e3
-1 0xffff8800562d3f58 0x0
-1 0xffff88005eafbf58 0x0
-1 0xffff880056313f58 0x0
-1 0xffff88007022ff58 0x0
-1 0xffff880070007f58 0x0
-1 0xffff8800643e3f58 0x0
-1 0xffff88002f733f58 0x0
-1 0xffff88002f76bf58 0x0
-1 0xffff88002f75bf58 0x0
23 0x6 0x7fff5f8c9090 0x7fff5f8c9110 0x7fff5f8c9190 0x0 0x0 0x7fff5f8c7e38 0x7f2d80c79693
-1 0xffff88006f2f3f58 0x0
-1 0xffff88006f843f58 0x0
-1 0xffff88006f847f58 0x0
-1 0xffff88006f9e7f58 0x0
-1 0xffff880071817f58 0x0
-1 0xffff8800563c7f58 0x0
-1 0xffff8800563cff58 0x0
-1 0xffff88007181bf58 0x0
-1 0xffff88007181ff58 0x0
cat: /proc/self/task/31635/syscall: No such file or directory
leszekhanusz commented 2 years ago

Note: after running

# for I in /proc/[1-9]*; do echo "";  echo $I; cat $I/comm; for J in $I/task/*; do echo $J; cat $J/comm; cat $J/syscall; done; done

I can confirm that all the tasks with the 1879048192 number correspond with real time tasks.

...
/proc/1482
pollservice
/proc/1482/task/1482
pollservice
1879048192 0x4808 0x7fffaa5f3390 0x7fffaa5f3340 0x7ff37af71b80 0x7e5 0x7fffaa5f3390 0x7fffaa5f3190 0x7ff37aeec569
/proc/1482/task/1484
pollservice
1879048192 0x4808 0x7ff37b80de90 0x7ff37b80de40 0x7ff37b80de90 0x7ff37b80de90 0x7ff37b80de90 0x7ff37b80cf98 0x7ff37aeec569
/proc/1482/task/1485
pollservice
23 0x6 0x7ff37b803950 0x0 0x0 0x7ff37b8039d0 0x50 0x7ff37b803458 0x7ff37aee96b3
/proc/1482/task/1486
pollservice
1879048192 0x4808 0x7ff37b7ffa60 0x7ff37b7ffa10 0x7ff37b7ffa60 0x7ff37b7ffa60 0x7ff37b7ffa60 0x7ff37b7fee28 0x7ff37aeec569
/proc/1482/task/1487
pollservice
23 0x5 0x7ff37b7fbdb0 0x0 0x0 0x7ff37b7fbe30 0x7ff37b7fb6c0 0x7ff37b7fb148 0x7ff37aee96b3
...
leszekhanusz commented 2 years ago

See this link,

we have #define | RTAI_SYSCALL_NR 0x70000000

tanelpoder commented 2 years ago

Cool, I learned something new! Thanks for the PR, I'll review and merge it.