colinbs / rpki-test-script

Testing script for RPKI implementations
1 stars 0 forks source link

rtr-validator segfaults #4

Open fho opened 7 years ago

fho commented 7 years ago

I'm using rpki-test-script 1ea1c222 and RTRTestsuite-0.0.1-SNAPSHOT like described in the README with http://archive.routeviews.org/bgpdata/2017.02/RIBS/rib.20170204.0800.bz2 and rpki-test-script/roas.

I updated rpki-validator.sh to load the rtrlib 16879b3 library from my local git dir:

$ git diff
diff --git a/rpki-validator.sh b/rpki-validator.sh
old mode 100644
new mode 100755
index c9bf6c08..61ac628b
--- a/rpki-validator.sh
+++ b/rpki-validator.sh
@@ -23,13 +23,14 @@
 #printf " done!\n"

 # the old state of the RTRlib
-LD_PRELOAD=/home/colin/projects/shell/ripe-rtr-validator/v2/libs/librtr-old/librtr.so ./rtr-validator $1.formatted old-result.txt $2 $3
-
-# the trie fix by Andreas
-LD_PRELOAD=/home/colin/projects/shell/ripe-rtr-validator/v2/libs/librtr-trie/librtr.so ./rtr-validator $1.formatted trie-result.txt $2 $3
-
-# the fix by Sebastian
-LD_PRELOAD=/home/colin/projects/shell/ripe-rtr-validator/v2/libs/librtr-fix/librtr.so ./rtr-validator $1.formatted fix-result.txt $2 $3
+LD_PRELOAD=/home/fho/git/rtrlib/librtr.so ./rtr-validator $1.formatted old-result.txt $2 $3

When I'm running "$ ./rpki-validator.sh rib.20170204.0800 localhost 8181", the rtr-validator segfaults:

(2017/02/04 09:56:05:013753): RTR_MGR: Group(1) status changed to: RTR_MGR_ESTABLISHED
(2017/02/04 09:56:05:013764): RTR Socket: State: RTR_ESTABLISHED
(2017/02/04 09:56:05:013775): RTR Socket: waiting 30 sec. till next sync
(2017/02/04 09:56:05:980482): RTR_MGR: rtr_mgr_stop()
(2017/02/04 09:56:05:980528): RTR Socket: rtr_stop()
(2017/02/04 09:56:05:980543): RTR_MGR: Group(1) status changed to: RTR_MGR_CLOSED
(2017/02/04 09:56:05:980555): RTR Socket: pthread_kill()
(2017/02/04 09:56:05:980578): RTR Socket: pthread_join()
(2017/02/04 09:56:05:980630): RTR Socket: receive call interrupted
(2017/02/04 09:56:05:980647): RTR Socket: State: RTR_SHUTDOWN
(2017/02/04 09:56:05:980727): TCP Transport(localhost:8181): Socket closed
(2017/02/04 09:56:05:981143): RTR Socket: Socket shut down
(2017/02/04 09:56:05:981165): RTR_MGR: rtr_mgr_free()
./rpki-validator.sh: line 26: 10466 Segmentation fault      (core dumped) LD_PRELOAD=/home/fho/git/rtrlib/librtr.so ./rtr-validator $1.formatted old-result.txt $2 $3
Cleanup... done!
fho commented 7 years ago

Ah, it seems that the problem is that in rpki-validator.sh the lines to convert the binary mib to csv are commented out (https://github.com/ColinBS/rpki-test-script/blob/master/rpki-validator.sh#L17) :-)