Błąd #3529
segfault w wccl-run dla -V 1
Status: | Zamknięty | Start date: | 20 Dec 2011 | |
---|---|---|---|---|
Priority: | Normalny | Due date: | ||
Assignee: | Adam Radziszewski | % Done: | 0% | |
Category: | - | |||
Target version: | - |
Description
Udało mi się zepsuć wccl-run na nowych bóstach używając:
wccl-run -i poliqarp -I /home/boban/korpusy/poliqarp2/kgr6/1003/1003 base[0] class[0] ./verbAdjPartNomMod.ccl -V 1
Gdy nie dam tego -V 1
to nie ma problemu. Z -V 1
po drugim zdaniu się wywala, np.
S# # orth base[0] class[0] test-0 (test-0)$AL (test-0)$AR (test-0)$Ad (test-0)$AdL (test-0)$AdR (test-0)$PL (test-0)$PR (test-0)$SL (test-0)$SR (test-0)$VL (test-0)$VR 0 1 Nie ["nie"] {qub} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 2 mów ["mówić"] {impt} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 3 : [":"] {interp} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 4 Jak ["jak"] {conj} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 5 to ["to"] {subst} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 6 jest ["być"] {fin} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 7 , [","] {interp} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 8 że ["że"] {conj} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 9 dni ["dzień"] {subst} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 10 dawne ["dawny"] {adj} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 11 były ["być"] {praet} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 12 lepsze ["dobry"] {adj} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 13 niż ["niż"] {conj} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 14 te ["ten"] {adj} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 15 co ["co"] {subst} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 16 są ["być"] {fin} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 17 teraz ["teraz"] {qub} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 0 18 ? ["?"] {interp} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere S# # orth base[0] class[0] test-0 (test-0)$AL (test-0)$AR (test-0)$Ad (test-0)$AdL (test-0)$AdR (test-0)$PL (test-0)$PR (test-0)$SL (test-0)$SR (test-0)$VL (test-0)$VR 1 1 Bo ["bo"] {conj} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 1 2 nie ["nie"] {qub} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 1 3 z ["z"] {prep} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 1 4 mądrości ["mądrość"] {subst} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 1 5 zapytujesz ["zapytywać"] {fin} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 1 6 o ["o"] {prep} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 1 7 to ["to"] {subst} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere 1 8 . ["."] {interp} False nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere nowhere Segmentation fault
Niestety problem występuje tylko u mnie na nowym kubuntu (więc podejrzewam, że to może być coś bardzo subtelnego). Testowane na różnych korpusach w formacie poliqarpa. Problemu nie udało mi się odtworzyć na ubuntu 10.04 w 4.19. Wpisuję jednak ticketa, żeby było wiadomo co sprawdzać po upgradzie na nowsze systemy operacyjne...
History
#1 Updated by Adam Radziszewski almost 12 years ago
- Priority changed from Niski to Normalny
To dość niepokojące :(
Wygląda na to, że wywala się na trzecim zdaniu. Mógłbyś wyciągnąć to zdanie za pomocą corpus-get i sprawdzić, czy też się wywali na XCES-ie? Zdania indeksuje się od zera, czyli będzie
corpus-get -i poliqarp /home/boban/korpusy/poliqarp2/kgr6/1003/1003 2 -o xces > death_sentence.xml
#2 Updated by Bartosz Broda almost 12 years ago
Postaram się wieczorem to sprawdzić.
#3 Updated by Adam Radziszewski almost 12 years ago
Zrób przy okazji make test
w corpus2 i wccl-u, a nuż to coś wykryje…
#4 Updated by Bartosz Broda almost 12 years ago
- File death_sentence.xml
added
- File valgrind.txt
added
Adam Radziszewski wrote:
To dość niepokojące :(
Wygląda na to, że wywala się na trzecim zdaniu. Mógłbyś wyciągnąć to zdanie za pomocą corpus-get i sprawdzić, czy też się wywali na XCES-ie? Zdania indeksuje się od zera, czyli będzie [...]
Odpaliłem coprus geta, załączam wynik. Zdanie w xcesie przechodzi. Jednak jest coś źle, bo valgrind pokazuje takie podsumowanie dla uruchomienia wccl-run na xcesie:
==23734== ==23734== HEAP SUMMARY: ==23734== in use at exit: 966 bytes in 20 blocks ==23734== total heap usage: 10,368 allocs, 10,348 frees, 726,524 bytes allocated ==23734== ==23734== LEAK SUMMARY: ==23734== definitely lost: 0 bytes in 0 blocks ==23734== indirectly lost: 0 bytes in 0 blocks ==23734== possibly lost: 0 bytes in 0 blocks ==23734== still reachable: 966 bytes in 20 blocks ==23734== suppressed: 0 bytes in 0 blocks ==23734== Rerun with --leak-check=full to see details of leaked memory ==23734== ==23734== For counts of detected and suppressed errors, rerun with: -v ==23734== ERROR SUMMARY: 3402 errors from 52 contexts (suppressed: 6 from 6)
Dla pewności podaję wywołanie valgrinda:
valgrind wccl-run -i xces -I /home/boban/death_sentence.xml base[0] class[0] ./verbAdjPartNomMod.ccl -V 1
I załączam całe wyjście z valgrinda.
Niestety to nie jest problem tylko wccl-run. Wcześniej próbowałem odpalić jeden z programów w SuperMatrix (orthdict), który korzysta z readrów corpus2, w tym z mwereadera (który korzysta z wccla). Po kilku niewyjaśnionych segfaultach w losowym momencie prze-kompilowałem wszystko w trybie DEBUG i odpaliłem z valgrindem. Oto kawałek wyniku:
==15415== Invalid read of size 8 ==15415== at 0x5AC681D: std::_Rb_tree_increment(std::_Rb_tree_node_base*) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16) ==15415== by 0xA9E52EC: std::_Rb_tree_const_iterator<std::pair<std::string const, boost::shared_ptr<Wccl::Value> > >::operator++() (stl_tree.h:269) ==15415== by 0xA9E3A3D: void boost::foreach_detail_::next<std::map<std::string, boost::shared_ptr<Wccl::Value>, std::less<std::string>, std::allocator<std::pair<std::string const, boost::shared_ptr<Wccl::Value> > > >, mpl_::bool_<true> >(boost::foreach_detail_::auto_any_base const&, boost::foreach_detail_::type2type<std::map<std::string, boost::shared_ptr<Wccl::Value>, std::less<std::string>, std::allocator<std::pair<std::string const, boost::shared_ptr<Wccl::Value> > > >, mpl_::bool_<true> >*) (foreach.hpp:737) ==15415== by 0xA9E30B3: Wccl::ParsedExpression::valid_variable_names() const (parsedexpression.h:276) ==15415== by 0xA9E19FE: Corpus2::LexicalUnit::IsHere(Wccl::SentenceContext const&, std::set<int, std::less<int>, std::allocator<int> >&, int&) const (mwe.cpp:67) ==15415== by 0xA9D29CB: Corpus2::MWEReader::process_sentence(boost::shared_ptr<Corpus2::Sentence>) (mwereader.cpp:91) ==15415== by 0xA9D2682: Corpus2::MWEReader::get_next_sentence() (mwereader.cpp:71)
Dodam, że z samym readerem poliqarpowym przechodzi przez korpusy (jeszcze do końca nie przeszło, bo to trwa, ale segfaulty do tej pory występowały do 30 minut).
Niestety problemu wciąż nie można powtórzyć na Ubuntu 10.04. Główne różnicę to wersja boosta i libstdc++ (6.0.16 vs 6.0.13). Boo zgaduje, że również coś z ANTLRem może być nie-tak.
Adam Radziszewski wrote:
Zrób przy okazji make test w corpus2 i wccl-u, a nuż to coś wykryje…
2x *** No errors detected
Jest jeszcze jedna potencjalna przyczyna błędów: mam uszkodzony komputer (np. RAM). Jest to mało prawdopodobne, ale upewnię się i:
- puszczę memtesta (wstępne przepuszczenie 10% pierwszego przejścia nie wykazało obvious błędów w pamięci)
- spróbuję zainstalować kubuntu 11.04 w virtualboxie na PWr i tam odtworzyć sytuację.
#5 Updated by Bartosz Broda almost 12 years ago
Bartosz Broda wrote:
Odpaliłem coprus geta, załączam wynik. Zdanie w xcesie przechodzi. Jednak jest coś źle, bo valgrind pokazuje takie podsumowanie:
Oczywiście valgrind pokazuje podsumowanie dla wccl-run (komenda poniżej pre
).
#6 Updated by Bartosz Broda almost 12 years ago
- File output_valgrind.txt
added
Uaktualnienie informacji:
- przedostatnie ubuntu (11.04) w vm - valgrind na wccl-run przechodzi bez problmów
- kubuntu 11.10 w vm valgrind zwraca tysiace problemów
Obie maszyny na moim komputerze domowym (ale RAM jest w porządku memtest nic nie pokazał).
Przy okazji załączam wyjście z valgrinda dla corpus2 i wccl przekompilowanego w trybie debug - wyjście powinno być bardziej informatywne.
#7 Updated by Tomasz Śniatowski almost 12 years ago
A zobaczcie czy po zamianie w Wccl::Variables::reset_values() (variables.cpp:112) foreacha z boost::mpl::vectorem na reczne wywolanie reseta dla kazdej ze skladowych map dalej bedzie sie tam valgrind plul
Pzdr ;)
#8 Updated by Bartosz Broda almost 12 years ago
Tomasz Śniatowski wrote:
A zobaczcie czy po zamianie w Wccl::Variables::reset_values() (variables.cpp:112) foreacha z boost::mpl::vectorem na reczne wywolanie reseta dla kazdej ze skladowych map dalej bedzie sie tam valgrind plul
Pzdr ;)
A Ty co tu robisz? ;-)
Ja tego kodu nie znam + jest w nim dla mnie za dużo template magic, żebym coś w nim miał zmieniać. Adamie, może zmienisz to co Tomek sugeruje i pchniesz to na jakiegoś brancha a ja to sprawdzę na nowym bóście?
#9 Updated by Tomasz Śniatowski almost 12 years ago
A Ty co tu robisz? ;-)
Ilor wiecznie żywy :P Boo mi dał znać że problem wystąpił, może nawet zerknę i/lub wspomogę Adama ;)
#10 Updated by Adam Radziszewski almost 12 years ago
Hej ;)
No najlepiej byłoby, gdybyś mnie wspomógł, bo ta iteracja po typach przerasta moje możliwości. Mogę się odwdzięczyć w postaci płynnej.
BTW ostatnio Bartek z Pawłem znaleźli coś tak koszmarnego w value.h (VALUE_PREAMBLE), że masz szczęście, że u nas już nie pracujesz ;D
#11 Updated by Tomasz Śniatowski almost 12 years ago
Is it better now? faad806bf01c961f23a026261cdb23248cb8ad70
#12 Updated by Bartosz Broda almost 12 years ago
Tomasz Śniatowski wrote:
Is it better now? faad806bf01c961f23a026261cdb23248cb8ad70
Nie wiem. Zanim ściągnąłem nową wersję wccla odpaliłem stary kod - i się segfault nie pojawił :/. Próbowałem na korpusie poliqarpowym i xmlowym i segfaulta brak. Natomiast valgrind pokazał te 3800 błędów na death_sentence.xml na starym kodzie a na nowym nie, więc jest szansa, że już jest dobrze. Danke schón!
#13 Updated by Adam Radziszewski over 11 years ago
- Status changed from Nowy to Zamknięty
Nikt nie zgłaszał powtórzenia się sytuacji, więc uznaję, że błąd został naprawiony. Dzięki jeszcze raz :)