Bug 31416 - no previous prototype for ‘__stp_dfa0’
Summary: no previous prototype for ‘__stp_dfa0’
Status: RESOLVED WONTFIX
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-26 13:54 UTC by Martin Cermak
Modified: 2024-03-11 08:04 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Cermak 2024-02-26 13:54:50 UTC
The CI system points out a problem reproducible using two tests (/tests/Regression/python-probing, /tests/Regression/second-command-not-captured) on two distros (f38, f39):

:: [ 15:36:52 ] :: [  BEGIN   ] :: Running 'stap -v ./ruby-exercise.stp -c ./test.sh -o stap.log'
Pass 1: parsed user script and 495 library scripts using 142012virt/112264res/15872shr/95664data kb, in 140usr/30sys/173real ms.
Pass 2: analyzed script: 12 probes, 7 functions, 1 embed, 0 globals using 220376virt/122000res/21128shr/108300data kb, in 130usr/40sys/1970real ms.
WARNING: missing unwind/symbol data for module '/var/ARTIFACTS/work-ci22m792h4/plans/ci/discover/default-0/tests/tests/Regression/second-command-not-captured/test.sh'
Pass 3: translated to C into "/tmp/stapZAPbYM/stap_70f3353a5dfd904e4d8066c530b1ad80_15506_src.c" using 220396virt/122704res/21692shr/108320data kb, in 100usr/210sys/314real ms.
/tmp/stapZAPbYM/stap_70f3353a5dfd904e4d8066c530b1ad80_15506_src.c:593:5: error: no previous prototype for ‘__stp_dfa0’ [-Werror=missing-prototypes]
  593 | int __stp_dfa0 (struct context * __restrict__ c, const char *str) {
      |     ^~~~~~~~~~
/tmp/stapZAPbYM/stap_70f3353a5dfd904e4d8066c530b1ad80_15506_src.c:1917:5: error: no previous prototype for ‘__stp_dfa1’ [-Werror=missing-prototypes]
 1917 | int __stp_dfa1 (struct context * __restrict__ c, const char *str) {
      |     ^~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:243: /tmp/stapZAPbYM/stap_70f3353a5dfd904e4d8066c530b1ad80_15506_src.o] Error 1
make: *** [Makefile:1929: /tmp/stapZAPbYM] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_70f3353a5dfd904e4d8066c530b1ad80_15506.ko" in 29460usr/5030sys/18748real ms.
Pass 4: compilation failed.  [man error::pass4]
Kernel version 6.7.4 is outside tested range 2.6.32 ... 6.6-rc1
:: [ 15:37:14 ] :: [   FAIL   ] :: Command 'stap -v ./ruby-exercise.stp -c ./test.sh -o stap.log' (Expected 0, got 1)



:: [ 15:36:32 ] :: [  BEGIN   ] :: Testing with list.stp :: actually running 'stap list.stp -v -c "python3 test.py" > list'
Pass 1: parsed user script and 495 library scripts using 142004virt/112352res/15872shr/95656data kb, in 150usr/30sys/174real ms.
Pass 2: analyzed script: 4 probes, 10 functions, 2 embeds, 2 globals using 144388virt/117204res/18292shr/98040data kb, in 10usr/0sys/13real ms.
Pass 3: translated to C into "/tmp/stapa1Od0x/stap_e1032ac72f212a8f75a968f89bf03e58_7470_src.c" using 145544virt/118728res/18704shr/99196data kb, in 90usr/220sys/315real ms.
/tmp/stapa1Od0x/stap_e1032ac72f212a8f75a968f89bf03e58_7470_src.c:498:5: error: no previous prototype for ‘__stp_dfa0’ [-Werror=missing-prototypes]
  498 | int __stp_dfa0 (struct context * __restrict__ c, const char *str) {
      |     ^~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:243: /tmp/stapa1Od0x/stap_e1032ac72f212a8f75a968f89bf03e58_7470_src.o] Error 1
make: *** [Makefile:1929: /tmp/stapa1Od0x] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_e1032ac72f212a8f75a968f89bf03e58_7470.ko" in 29400usr/4910sys/18572real ms.
Pass 4: compilation failed.  [man error::pass4]
Kernel version 6.7.4 is outside tested range 2.6.32 ... 6.6-rc1
:: [ 15:36:51 ] :: [   FAIL   ] :: Testing with list.stp (Expected 0, got 1)


CI system link (expected to expire): https://artifacts.dev.testing-farm.io/3682269a-3d5e-4a93-be80-1062bde45033/
Comment 1 Martin Cermak 2024-02-26 13:59:58 UTC
Reproducible using 
systemtap-5.1~pre17062192g5fd8daba-1.fc39 and 
systemtap-5.1~pre17062192g5fd8daba-1.fc38 .
Comment 2 Frank Ch. Eigler 2024-02-26 14:31:57 UTC
Yeah, with rawhide gcc, the translator must emit function prototypes, even if they simply duplicate function definitions.
Comment 3 Martin Cermak 2024-02-26 14:38:36 UTC
Just tested that upstream version 8a9097d906867d364bc94f9c1552f240ca609422 doesn't have this problem.  Rebase on both (f38 and f39) would solve the problem.
Comment 4 Martin Cermak 2024-03-11 08:04:38 UTC
Keeping this one as a CI Waiver reference.