Menu

#90 lt-proc memory leak on eng-fin with eng_feil

open
nobody
lt-proc (6)
2016-01-18
2016-01-18
No

In current apertium-fin-eng https://github.com/flammie/apertium-fin-eng using apertium-fin from github https://github.com/flammie/apertium-fin and apertium-eng_feil from apertium, the memory keeps running out for long translations.

Do e.g.,

apertium -d $HOME/Koodit/apertium-fin-eng eng-fin-debug < europarl-v8.fi-en.norm.tok.en > europarl-v8.fi-en.norm.tok.apertium.en-fi.translated.fi.debug
^Z
bg
top

and see:

12345 tpirinen  20   0 3866m 3,8g 1640 R  99,4 11,9  27:39.49 lt-proc           

Surely it should be relatively stable for lt-proc. This is likely apertium's English analysis, since generation uses hfst-proc.

Any easy way to debug further? I'm running this on quite limited cluster node with little chance to control much, though I can test elsewhere if it don't need as much memory.

(sorry if sf.net makes the usual mess out of this message despite it looking neat in the preview again...)

Discussion

  • Flammie Pirinen

    Flammie Pirinen - 2016-01-18

    Ok, here's something I found with valgrind and Tino's help:

    $ head -n 167 europarl-v8.fi-en.norm.tok.en | tail -n 1 | valgrind --leak-check=full --show-reachable lt-proc -w $HOME/Koodit/apertium-fin-eng/eng-fin.automorf.bin > /dev/null
    
    ==23687== LEAK SUMMARY:
    ==23687==    definitely lost: 0 bytes in 212,583 blocks
    ==23687==    indirectly lost: 0 bytes in 0 blocks
    ==23687==      possibly lost: 6,463 bytes in 100 blocks
    ==23687==    still reachable: 5,335,504 bytes in 160,388 blocks
    ==23687==         suppressed: 0 bytes in 0 blocks
    ==23687== 
    
    $ head -n 167 europarl-v8.fi-en.norm.tok.en | tail -n 1
    
    The next item is the report ( A5-0105 / 1999 ) by Mr Koch , on behalf of the Committee on Regional Policy , Transport and Tourism , on the common position adopted by the Council with a view to adopting a European Parliament and Council directive on the harmonisation of examination requirements for safety advisers for the transport of dangerous goods by road , rail or inland waterways ( C5-0208 / 1999 - 1998 / 0106 ( COD ) ) .
    

    The listing of leaks is quite long, I've attached the log, the biggest memory leaks are:

    ==23687== 1,320 bytes in 33 blocks are still reachable in loss record 267 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ECDA1B: __gnu_cxx::new_allocator<std::_Rb_tree_node<Node*> >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4ECDA30: std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_get_node() (stl_tree.h:369)
    ==23687==    by 0x4ECDA58: std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_create_node(Node* const&) (stl_tree.h:379)
    ==23687==    by 0x4ECDB13: std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, Node* const&) (stl_tree.h:979)
    ==23687==    by 0x4ECDCA4: std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_insert_unique(Node* const&) (stl_tree.h:1299)
    ==23687==    by 0x4EE642E: std::set<Node*, std::less<Node*>, std::allocator<Node*> >::insert(Node* const&) (stl_set.h:415)
    ==23687==    by 0x4EE50B4: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:95)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 1,320 bytes in 33 blocks are still reachable in loss record 268 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ECDA1B: __gnu_cxx::new_allocator<std::_Rb_tree_node<Node*> >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4ECDA30: std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_get_node() (stl_tree.h:369)
    ==23687==    by 0x4ECDA58: std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_create_node(Node* const&) (stl_tree.h:379)
    ==23687==    by 0x4ECDB13: std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, Node* const&) (stl_tree.h:979)
    ==23687==    by 0x4ECDDDA: std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_insert_unique_(std::_Rb_tree_const_iterator<Node*>, Node* const&) (stl_tree.h:1346)
    ==23687==    by 0x4ECE02A: void std::_Rb_tree<Node*, Node*, std::_Identity<Node*>, std::less<Node*>, std::allocator<Node*> >::_M_insert_unique<std::_Rb_tree_const_iterator<Node*> >(std::_Rb_tree_const_iterator<Node*>, std::_Rb_tree_const_iterator<Node*>) (stl_tree.h:1474)
    ==23687==    by 0x4ECE056: void std::set<Node*, std::less<Node*>, std::allocator<Node*> >::insert<std::_Rb_tree_const_iterator<Node*> >(std::_Rb_tree_const_iterator<Node*>, std::_Rb_tree_const_iterator<Node*>) (stl_set.h:470)
    ==23687==    by 0x4EC8654: FSTProcessor::classifyFinals() (fst_processor.cc:557)
    ==23687==    by 0x4EC885D: FSTProcessor::initAnalysis() (fst_processor.cc:715)
    ==23687==    by 0x402177: main (lt_proc.cc:320)
    ==23687== 
    ==23687== 2,880 bytes in 72 blocks are still reachable in loss record 269 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4EB6457: __gnu_cxx::new_allocator<std::_Rb_tree_node<wchar_t> >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4EB646C: std::_Rb_tree<wchar_t, wchar_t, std::_Identity<wchar_t>, std::less<wchar_t>, std::allocator<wchar_t> >::_M_get_node() (stl_tree.h:369)
    ==23687==    by 0x4EB6494: std::_Rb_tree<wchar_t, wchar_t, std::_Identity<wchar_t>, std::less<wchar_t>, std::allocator<wchar_t> >::_M_create_node(wchar_t const&) (stl_tree.h:379)
    ==23687==    by 0x4EB654F: std::_Rb_tree<wchar_t, wchar_t, std::_Identity<wchar_t>, std::less<wchar_t>, std::allocator<wchar_t> >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, wchar_t const&) (stl_tree.h:979)
    ==23687==    by 0x4EB66E0: std::_Rb_tree<wchar_t, wchar_t, std::_Identity<wchar_t>, std::less<wchar_t>, std::allocator<wchar_t> >::_M_insert_unique(wchar_t const&) (stl_tree.h:1299)
    ==23687==    by 0x4EB6792: std::set<wchar_t, std::less<wchar_t>, std::allocator<wchar_t> >::insert(wchar_t const&) (stl_set.h:415)
    ==23687==    by 0x4EC895B: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:687)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 5,184 bytes in 1 blocks are still reachable in loss record 270 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4EB0A15: __gnu_cxx::new_allocator<std::pair<int, int> >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4EB0A2F: std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int> > >::_M_allocate(unsigned long) (in /home/tpirinen/lib64/liblttoolbox3-3.3.so.0.0.0)
    ==23687==    by 0x4EB1CED: std::pair<int, int>* std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator<std::pair<int, int> const*, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > > >(unsigned long, __gnu_cxx::__normal_iterator<std::pair<int, int> const*, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >, __gnu_cxx::__normal_iterator<std::pair<int, int> const*, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > >) (stl_vector.h:1109)
    ==23687==    by 0x4EB1E6F: std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::operator=(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&) (vector.tcc:186)
    ==23687==    by 0x4EAF563: Alphabet::copy(Alphabet const&) (alphabet.cc:71)
    ==23687==    by 0x4EAF59C: Alphabet::operator=(Alphabet const&) (alphabet.cc:55)
    ==23687==    by 0x4EAF744: Alphabet::read(_IO_FILE*) (alphabet.cc:170)
    ==23687==    by 0x4EC897A: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:692)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 6,016 bytes in 96 blocks are possibly lost in loss record 271 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x5B7571F: std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_create(unsigned long, unsigned long, std::allocator<wchar_t> const&) (in /usr/lib64/libstdc++.so.6.0.17)
    ==23687==    by 0x5B764D7: std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_M_clone(std::allocator<wchar_t> const&, unsigned long) (in /usr/lib64/libstdc++.so.6.0.17)
    ==23687==    by 0x5B765BF: std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::reserve(unsigned long) (in /usr/lib64/libstdc++.so.6.0.17)
    ==23687==    by 0x5B76884: std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::append(wchar_t const*, unsigned long) (in /usr/lib64/libstdc++.so.6.0.17)
    ==23687==    by 0x4EAFA09: std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > std::operator+<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, wchar_t const*) (basic_string.h:2403)
    ==23687==    by 0x4EAF651: Alphabet::read(_IO_FILE*) (alphabet.cc:151)
    ==23687==    by 0x4EC897A: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:692)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 8,192 bytes in 1 blocks are still reachable in loss record 272 of 280
    ==23687==    at 0x4C2A147: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ECC55F: Buffer<int>::Buffer(unsigned int) (buffer.h:81)
    ==23687==    by 0x4EC8B10: FSTProcessor::FSTProcessor() (fst_processor.cc:33)
    ==23687==    by 0x401B1F: main (lt_proc.cc:93)
    ==23687== 
    ==23687== 226,720 bytes in 53,145 blocks are still reachable in loss record 273 of 280
    ==23687==    at 0x4C2A147: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ED199F: Node::addTransition(int, int, Node*) (node.cc:60)
    ==23687==    by 0x4EE5196: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:112)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 392,896 bytes in 6,139 blocks are still reachable in loss record 274 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ED2052: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Dest> > >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4ED2068: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_get_node() (stl_tree.h:369)
    ==23687==    by 0x4ED2090: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_create_node(std::pair<int const, Dest> const&) (stl_tree.h:379)
    ==23687==    by 0x4ED2175: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair<int const, Dest> const&) (stl_tree.h:979)
    ==23687==    by 0x4ED2521: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_unique_(std::_Rb_tree_const_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_tree.h:1367)
    ==23687==    by 0x4ED2674: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::insert(std::_Rb_tree_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_map.h:576)
    ==23687==    by 0x4ED26FF: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::operator[](int const&) (stl_map.h:458)
    ==23687==    by 0x4ED1989: Node::addTransition(int, int, Node*) (node.cc:58)
    ==23687==    by 0x4EE5196: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:112)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 396,672 bytes in 6,198 blocks are still reachable in loss record 275 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ED2052: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Dest> > >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4ED2068: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_get_node() (stl_tree.h:369)
    ==23687==    by 0x4ED2090: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_create_node(std::pair<int const, Dest> const&) (stl_tree.h:379)
    ==23687==    by 0x4ED2175: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair<int const, Dest> const&) (stl_tree.h:979)
    ==23687==    by 0x4ED2509: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_unique_(std::_Rb_tree_const_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_tree.h:1363)
    ==23687==    by 0x4ED2674: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::insert(std::_Rb_tree_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_map.h:576)
    ==23687==    by 0x4ED26FF: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::operator[](int const&) (stl_map.h:458)
    ==23687==    by 0x4ED1989: Node::addTransition(int, int, Node*) (node.cc:58)
    ==23687==    by 0x4EE5196: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:112)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 430,144 bytes in 6,721 blocks are still reachable in loss record 276 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ED2052: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Dest> > >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4ED2068: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_get_node() (stl_tree.h:369)
    ==23687==    by 0x4ED2090: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_create_node(std::pair<int const, Dest> const&) (stl_tree.h:379)
    ==23687==    by 0x4ED2175: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair<int const, Dest> const&) (stl_tree.h:979)
    ==23687==    by 0x4ED24AB: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_unique_(std::_Rb_tree_const_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_tree.h:1357)
    ==23687==    by 0x4ED2674: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::insert(std::_Rb_tree_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_map.h:576)
    ==23687==    by 0x4ED26FF: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::operator[](int const&) (stl_map.h:458)
    ==23687==    by 0x4ED1989: Node::addTransition(int, int, Node*) (node.cc:58)
    ==23687==    by 0x4EE5196: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:112)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 453,440 bytes in 53,145 blocks are still reachable in loss record 277 of 280
    ==23687==    at 0x4C2A147: operator new[](unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ED19AE: Node::addTransition(int, int, Node*) (node.cc:61)
    ==23687==    by 0x4EE5196: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:112)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 587,712 bytes in 9,183 blocks are still reachable in loss record 278 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ED2052: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Dest> > >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4ED2068: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_get_node() (stl_tree.h:369)
    ==23687==    by 0x4ED2090: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_create_node(std::pair<int const, Dest> const&) (stl_tree.h:379)
    ==23687==    by 0x4ED2175: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair<int const, Dest> const&) (stl_tree.h:979)
    ==23687==    by 0x4ED243C: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_unique_(std::_Rb_tree_const_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_tree.h:1346)
    ==23687==    by 0x4ED2674: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::insert(std::_Rb_tree_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_map.h:576)
    ==23687==    by 0x4ED26FF: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::operator[](int const&) (stl_map.h:458)
    ==23687==    by 0x4ED1989: Node::addTransition(int, int, Node*) (node.cc:58)
    ==23687==    by 0x4EE5196: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:112)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 1,195,488 bytes in 2 blocks are still reachable in loss record 279 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4EE5639: __gnu_cxx::new_allocator<Node>::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4EE5653: std::_Vector_base<Node, std::allocator<Node> >::_M_allocate(unsigned long) (in /home/tpirinen/lib64/liblttoolbox3-3.3.so.0.0.0)
    ==23687==    by 0x4EE6227: std::vector<Node, std::allocator<Node> >::_M_fill_insert(__gnu_cxx::__normal_iterator<Node*, std::vector<Node, std::allocator<Node> > >, unsigned long, Node const&) (vector.tcc:481)
    ==23687==    by 0x4EE63B0: std::vector<Node, std::allocator<Node> >::insert(__gnu_cxx::__normal_iterator<Node*, std::vector<Node, std::allocator<Node> > >, unsigned long, Node const&) (stl_vector.h:1004)
    ==23687==    by 0x4EE63F7: std::vector<Node, std::allocator<Node> >::resize(unsigned long, Node) (stl_vector.h:687)
    ==23687==    by 0x4EE5054: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:90)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687==    by 0x401F60: main (lt_proc.cc:234)
    ==23687== 
    ==23687== 1,593,856 bytes in 24,904 blocks are still reachable in loss record 280 of 280
    ==23687==    at 0x4C2A6E7: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==23687==    by 0x4ED2052: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<int const, Dest> > >::allocate(unsigned long, void const*) (new_allocator.h:94)
    ==23687==    by 0x4ED2068: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_get_node() (stl_tree.h:369)
    ==23687==    by 0x4ED2090: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_create_node(std::pair<int const, Dest> const&) (stl_tree.h:379)
    ==23687==    by 0x4ED2175: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_(std::_Rb_tree_node_base const*, std::_Rb_tree_node_base const*, std::pair<int const, Dest> const&) (stl_tree.h:979)
    ==23687==    by 0x4ED2285: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_unique(std::pair<int const, Dest> const&) (stl_tree.h:1293)
    ==23687==    by 0x4ED244C: std::_Rb_tree<int, std::pair<int const, Dest>, std::_Select1st<std::pair<int const, Dest> >, std::less<int>, std::allocator<std::pair<int const, Dest> > >::_M_insert_unique_(std::_Rb_tree_const_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_tree.h:1348)
    ==23687==    by 0x4ED2674: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::insert(std::_Rb_tree_iterator<std::pair<int const, Dest> >, std::pair<int const, Dest> const&) (stl_map.h:576)
    ==23687==    by 0x4ED26FF: std::map<int, Dest, std::less<int>, std::allocator<std::pair<int const, Dest> > >::operator[](int const&) (stl_map.h:458)
    ==23687==    by 0x4ED1989: Node::addTransition(int, int, Node*) (node.cc:58)
    ==23687==    by 0x4EE5196: TransExe::read(_IO_FILE*, Alphabet const&) (trans_exe.cc:112)
    ==23687==    by 0x4EC89E8: FSTProcessor::load(_IO_FILE*) (fst_processor.cc:705)
    ==23687== 
    
     
  • Flammie Pirinen

    Flammie Pirinen - 2016-01-18

    It's noteworthy that leak count is all 0's for all the previous lines of the file, I believe a specially formatted lines will bump the memory requirement up by that some 5 megs per line...

     

Log in to post a comment.