<< | Index | >>
Goal/Estimate/Evaluation:
oddb side (client side)
Experiment
masa@masa ~/ywesee/migel_dev $ ulimit -c unlimited masa@masa ~/ywesee/migel_dev $ sudo -u postgres dropdb migel; sudo -u postgres createdb -E UTF8 -T template0 migel masa@masa ~/ywesee/migel_dev $ bin/migeld
migel> Migel::Util::Importer.new.update('data/csv/migel_de.csv','de') -> Array migel> Migel::Util::Importer.new.update('data/csv/migel_fr.csv','fr') -> Array migel> Migel::Util::Importer.new.import_all_products_from_csv('migel_product_de.csv', 'de', true) -> connection closed
Log
11188 / 30742 Estimate total: 1.65 [h] It will be done in: 1.05 [h] 11189 / 30742 Estimate total: 1.65 [h] It will be done in: 1.05 [h] /usr/lib64/ruby/site_ruby/1.8/odba/cache_entry.rb:87: [BUG] Segmentation fault ruby 1.8.6 (2009-06-08) [x86_64-linux] Abgebrochen (Speicherabzug geschrieben)
Core dump info
$ gdb ruby core GNU gdb (Gentoo 7.2 p1) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/bin/ruby...(no debugging symbols found)...done. [New Thread 16771] warning: Can't read pathname for load map: Eingabe-/Ausgabefehler. Reading symbols from /usr/lib64/libruby18.so.1.8...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/libruby18.so.1.8 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/thread.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/thread.so Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/etc.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/etc.so Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/stringio.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/stringio.so Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/syck.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/syck.so Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/socket.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/socket.so Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/fcntl.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/fcntl.so Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/iconv.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/iconv.so Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/nkf.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/nkf.so Reading symbols from /usr/lib64/ruby/gems/1.8/gems/pg-0.9.0/lib/pg_ext.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/gems/1.8/gems/pg-0.9.0/lib/pg_ext.so Reading symbols from /usr/lib64/postgresql-8.4/lib64/libpq.so.5...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/postgresql-8.4/lib64/libpq.so.5 Reading symbols from /usr/lib/libssl.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libssl.so.0.9.8 Reading symbols from /usr/lib/libcrypto.so.0.9.8...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libcrypto.so.0.9.8 Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /lib/libnss_compat.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libnss_compat.so.2 Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libnss_nis.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libnss_nis.so.2 Reading symbols from /lib/libnss_files.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/digest/md5.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/digest/md5.so Reading symbols from /usr/lib64/ruby/1.8/x86_64-linux/digest.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/ruby/1.8/x86_64-linux/digest.so Core was generated by `ruby bin/migeld'. Program terminated with signal 6, Aborted. #0 0x00007fa164c4a065 in raise () from /lib/libc.so.6
Stack info (bt)
(gdb) bt #0 0x00007fa164c4a065 in raise () from /lib/libc.so.6 #1 0x00007fa164c4b490 in abort () from /lib/libc.so.6 #2 0x00007fa164f9c12b in rb_bug () from /usr/lib64/libruby18.so.1.8 #3 0x00007fa16500b8e2 in ?? () from /usr/lib64/libruby18.so.1.8 #4 <signal handler called> #5 0x00007fa16500eb07 in st_foreach () from /usr/lib64/libruby18.so.1.8 #6 0x00007fa164fbc97f in ?? () from /usr/lib64/libruby18.so.1.8 #7 0x00007fa164f9d459 in ?? () from /usr/lib64/libruby18.so.1.8 #8 0x00007fa164f9d387 in ?? () from /usr/lib64/libruby18.so.1.8 #9 0x00007fa164fbc97f in ?? () from /usr/lib64/libruby18.so.1.8 #10 0x00007fa164f9d459 in ?? () from /usr/lib64/libruby18.so.1.8 #11 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #12 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #13 0x00007fa164fbcf14 in ?? () from /usr/lib64/libruby18.so.1.8 #14 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #15 0x00007fa164fbcb40 in ?? () from /usr/lib64/libruby18.so.1.8 #16 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #17 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #18 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #19 0x00007fa164fbcbae in ?? () from /usr/lib64/libruby18.so.1.8 #20 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #21 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #22 0x00007fa164fbcbfd in ?? () from /usr/lib64/libruby18.so.1.8 #23 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #24 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #25 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #26 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #27 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #28 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #29 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #30 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #31 0x00007fa164fbcbae in ?? () from /usr/lib64/libruby18.so.1.8 #32 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #33 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #34 0x00007fa164fbcbfd in ?? () from /usr/lib64/libruby18.so.1.8 #35 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #36 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #37 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #38 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #39 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #40 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #41 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #42 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #43 0x00007fa164fbcbae in ?? () from /usr/lib64/libruby18.so.1.8 #44 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #45 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #46 0x00007fa164fbcbfd in ?? () from /usr/lib64/libruby18.so.1.8 #47 0x00007fa164fbcbae in ?? () from /usr/lib64/libruby18.so.1.8 #48 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #49 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #50 0x00007fa164fbcbfd in ?? () from /usr/lib64/libruby18.so.1.8 #51 0x00007fa164fbcbae in ?? () from /usr/lib64/libruby18.so.1.8 #52 0x00007fa164fbcdc7 in ?? () from /usr/lib64/libruby18.so.1.8 #53 0x00007fa164f9d5b2 in ?? () from /usr/lib64/libruby18.so.1.8 #54 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #55 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #56 0x00007fa164fbcbfd in ?? () from /usr/lib64/libruby18.so.1.8 #57 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #58 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #59 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #60 0x00007fa164fbcf14 in ?? () from /usr/lib64/libruby18.so.1.8 #61 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #62 0x00007fa164fbcb40 in ?? () from /usr/lib64/libruby18.so.1.8 #63 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #64 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #65 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #66 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #67 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #68 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #69 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #70 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #71 0x00007fa164fbcbae in ?? () from /usr/lib64/libruby18.so.1.8 #72 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #73 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #74 0x00007fa164fbcbfd in ?? () from /usr/lib64/libruby18.so.1.8 #75 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #76 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #77 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #78 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #79 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #80 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #81 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #82 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #83 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #84 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #85 0x00007fa164fbcbae in ?? () from /usr/lib64/libruby18.so.1.8 #86 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #87 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #88 0x00007fa164fbcbfd in ?? () from /usr/lib64/libruby18.so.1.8 #89 0x00007fa164fbcede in ?? () from /usr/lib64/libruby18.so.1.8 #90 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #91 0x00007fa164fbcc0a in ?? () from /usr/lib64/libruby18.so.1.8 #92 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #93 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #94 0x00007fa164fbca01 in ?? () from /usr/lib64/libruby18.so.1.8 #95 0x00007fa164fbcbae in ?? () from /usr/lib64/libruby18.so.1.8 #96 0x00007fa164fbd138 in ?? () from /usr/lib64/libruby18.so.1.8 #97 0x00007fa164fbdbcd in rb_newobj () from /usr/lib64/libruby18.so.1.8 #98 0x00007fa164fa0351 in ?? () from /usr/lib64/libruby18.so.1.8 #99 0x00007fa164fa040b in ?? () from /usr/lib64/libruby18.so.1.8 #100 0x00007fa164faa0bd in ?? () from /usr/lib64/libruby18.so.1.8 #101 0x00007fa164faa409 in ?? () from /usr/lib64/libruby18.so.1.8 #102 0x00007fa164fa8523 in ?? () from /usr/lib64/libruby18.so.1.8 #103 0x00007fa164fb3124 in rb_yield_values () from /usr/lib64/libruby18.so.1.8 #104 0x00007fa164fc0edc in ?? () from /usr/lib64/libruby18.so.1.8 #105 0x00007fa164fbfe14 in ?? () from /usr/lib64/libruby18.so.1.8 #106 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #107 0x00007fa164fc17ca in ?? () from /usr/lib64/libruby18.so.1.8 #108 0x00007fa164f9def2 in rb_ensure () from /usr/lib64/libruby18.so.1.8 #109 0x00007fa164fc0fae in rb_hash_foreach () from /usr/lib64/libruby18.so.1.8 #110 0x00007fa164fc16cd in rb_hash_delete_if () from /usr/lib64/libruby18.so.1.8 #111 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #112 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #113 0x00007fa164fa6c1c in ?? () from /usr/lib64/libruby18.so.1.8 #114 0x00007fa164fa768f in ?? () from /usr/lib64/libruby18.so.1.8 #115 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #116 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #117 0x00007fa164fa6c1c in ?? () from /usr/lib64/libruby18.so.1.8 #118 0x00007fa164fa407e in ?? () from /usr/lib64/libruby18.so.1.8 #119 0x00007fa164fa8007 in ?? () from /usr/lib64/libruby18.so.1.8 #120 0x00007fa164fbf862 in ?? () from /usr/lib64/libruby18.so.1.8 #121 0x00007fa164fbfe14 in ?? () from /usr/lib64/libruby18.so.1.8 #122 0x00007fa16500eb3d in st_foreach () from /usr/lib64/libruby18.so.1.8 #123 0x00007fa164fc17ca in ?? () from /usr/lib64/libruby18.so.1.8 #124 0x00007fa164f9def2 in rb_ensure () from /usr/lib64/libruby18.so.1.8 #125 0x00007fa164fc0fae in rb_hash_foreach () from /usr/lib64/libruby18.so.1.8 #126 0x00007fa164fc13a2 in ?? () from /usr/lib64/libruby18.so.1.8 #127 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #128 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #129 0x00007fa164fa6c1c in ?? () from /usr/lib64/libruby18.so.1.8 #130 0x00007fa164fa768f in ?? () from /usr/lib64/libruby18.so.1.8 #131 0x00007fa164fa715e in ?? () from /usr/lib64/libruby18.so.1.8 #132 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #133 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #134 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #135 0x00007fa164fa4b1e in ?? () from /usr/lib64/libruby18.so.1.8 #136 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #137 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #138 0x00007fa164fa4380 in ?? () from /usr/lib64/libruby18.so.1.8 #139 0x00007fa164fa715e in ?? () from /usr/lib64/libruby18.so.1.8 #140 0x00007fa164fa8007 in ?? () from /usr/lib64/libruby18.so.1.8 #141 0x00007fa164fb3483 in ?? () from /usr/lib64/libruby18.so.1.8 #142 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #143 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #144 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #145 0x00007fa164fa768f in ?? () from /usr/lib64/libruby18.so.1.8 #146 0x00007fa164fa8007 in ?? () from /usr/lib64/libruby18.so.1.8 #147 0x00007fa164fb0dec in ?? () from /usr/lib64/libruby18.so.1.8 #148 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #149 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #150 0x00007fa164faa700 in rb_funcall2 () from /usr/lib64/libruby18.so.1.8 #151 0x00007fa164faa7a2 in rb_obj_call_init () from /usr/lib64/libruby18.so.1.8 #152 0x00007fa164faa80e in ?? () from /usr/lib64/libruby18.so.1.8 #153 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #154 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #155 0x00007fa164fa6c1c in ?? () from /usr/lib64/libruby18.so.1.8 #156 0x00007fa164fa768f in ?? () from /usr/lib64/libruby18.so.1.8 #157 0x00007fa164fa4b1e in ?? () from /usr/lib64/libruby18.so.1.8 #158 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #159 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #160 0x00007fa164fa4380 in ?? () from /usr/lib64/libruby18.so.1.8 #161 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #162 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #163 0x00007fa164faa700 in rb_funcall2 () from /usr/lib64/libruby18.so.1.8 #164 0x00007fa164faa7a2 in rb_obj_call_init () from /usr/lib64/libruby18.so.1.8 #165 0x00007fa164fd4600 in rb_class_new_instance () from /usr/lib64/libruby18.so.1.8 #166 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #167 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #168 0x00007fa164fb25a4 in rb_call_super () from /usr/lib64/libruby18.so.1.8 #169 0x00007fa164fa9172 in ?? () from /usr/lib64/libruby18.so.1.8 #170 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #171 0x00007fa164fa4380 in ?? () from /usr/lib64/libruby18.so.1.8 #172 0x00007fa164fa4b1e in ?? () from /usr/lib64/libruby18.so.1.8 #173 0x00007fa164fa7342 in ?? () from /usr/lib64/libruby18.so.1.8 #174 0x00007fa164fa57df in ?? () from /usr/lib64/libruby18.so.1.8 #175 0x00007fa164fa8007 in ?? () from /usr/lib64/libruby18.so.1.8 #176 0x00007fa164fa89a7 in ?? () from /usr/lib64/libruby18.so.1.8 #177 0x00007fa164fa92f1 in ?? () from /usr/lib64/libruby18.so.1.8 #178 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #179 0x00007fa164fa6c1c in ?? () from /usr/lib64/libruby18.so.1.8 #180 0x00007fa164fa4b1e in ?? () from /usr/lib64/libruby18.so.1.8 #181 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #182 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #183 0x00007fa164fa6c1c in ?? () from /usr/lib64/libruby18.so.1.8 #184 0x00007fa164fa4199 in ?? () from /usr/lib64/libruby18.so.1.8 #185 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #186 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #187 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #188 0x00007fa164fb3f1e in ?? () from /usr/lib64/libruby18.so.1.8 #189 0x00007fa164fa60ca in ?? () from /usr/lib64/libruby18.so.1.8 #190 0x00007fa164fb3f1e in ?? () from /usr/lib64/libruby18.so.1.8 #191 0x00007fa164fa60ca in ?? () from /usr/lib64/libruby18.so.1.8 #192 0x00007fa164fb3f1e in ?? () from /usr/lib64/libruby18.so.1.8 #193 0x00007fa164fa60ca in ?? () from /usr/lib64/libruby18.so.1.8 #194 0x00007fa164fb62f5 in rb_load () from /usr/lib64/libruby18.so.1.8 #195 0x00007fa164fb6a02 in rb_require_safe () from /usr/lib64/libruby18.so.1.8 #196 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #197 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #198 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #199 0x00007fa164fa715e in ?? () from /usr/lib64/libruby18.so.1.8 #200 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #201 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #202 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #203 0x00007fa164fb62f5 in rb_load () from /usr/lib64/libruby18.so.1.8 #204 0x00007fa164fb6a02 in rb_require_safe () from /usr/lib64/libruby18.so.1.8 #205 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #206 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #207 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #208 0x00007fa164fa715e in ?? () from /usr/lib64/libruby18.so.1.8 #209 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #210 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #211 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #212 0x00007fa164fb3f1e in ?? () from /usr/lib64/libruby18.so.1.8 #213 0x00007fa164fa60ca in ?? () from /usr/lib64/libruby18.so.1.8 #214 0x00007fa164fb62f5 in rb_load () from /usr/lib64/libruby18.so.1.8 #215 0x00007fa164fb6a02 in rb_require_safe () from /usr/lib64/libruby18.so.1.8 #216 0x00007fa164fa9c0e in ?? () from /usr/lib64/libruby18.so.1.8 #217 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #218 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #219 0x00007fa164fa715e in ?? () from /usr/lib64/libruby18.so.1.8 #220 0x00007fa164fa9ab0 in ?? () from /usr/lib64/libruby18.so.1.8 #221 0x00007fa164fa9df3 in ?? () from /usr/lib64/libruby18.so.1.8 #222 0x00007fa164fa6b43 in ?? () from /usr/lib64/libruby18.so.1.8 #223 0x00007fa164fb4c95 in ?? () from /usr/lib64/libruby18.so.1.8 #224 0x00007fa164fb4cd5 in ruby_exec () from /usr/lib64/libruby18.so.1.8 #225 0x00007fa164fb4d05 in ruby_run () from /usr/lib64/libruby18.so.1.8 #226 0x0000000000400961 in main ()
Reference
Experiment (separate 'creating instance' and 'save' processes)
def update_product(migelid, record, lang = 'de') lang.downcase! product = migelid.products.find{|i| i.pharmacode == record[:pharmacode]} || begin i = Migel::Model::Product.new(record[:pharmacode]) migelid.products.push i # migelid.save i end product.migelid = migelid product.save product.ean_code = record[:ean_code] #product.article_name = record[:article_name] product.send(:article_name).send(lang.to_s + "=", record[:article_name]) #product.companyname = record[:companyname] product.send(:companyname).send(lang.to_s + "=", record[:companyname]) product.companyean = record[:companyean] product.ppha = record[:ppha] product.ppub = record[:ppub] product.factor = record[:factor] product.pzr = record[:pzr] #product.size = record[:size] product.send(:size).send(lang.to_s + "=", record[:size]) product.status = record[:status] product.datetime = record[:datetime] product.stdate = record[:stdate] product.language = record[:language] # product.save product end end
def import_all_products_from_csv(file_name = 'migel_products_de.csv', lang = 'de', estimate = false) lang.upcase! start_time = Time.new total = File.readlines(file_name).to_a.length count = 0 CSV.open(file_name, 'r') do |line| count += 1 migel_code = line[0] if migelid = Migel::Model::Migelid.find_by_migel_code(migel_code) record = { :pharmacode => line[1], :ean_code => line[2], :article_name => line[3], :companyname => line[4], :companyean => line[5], :ppha => line[6], :ppub => line[7], :factor => line[8], :pzr => line[9], :size => line[10], :status => line[11], :datetime => line[12], :stdate => line[13], :language => line[14], } update_product(migelid, record, lang) end puts estimate_time(start_time, total, count) if estimate endmigel_code_list.each do |migel_code|
if migelid = Migel::Model::Migelid.find_by_migel_code(migel_code)
migelid.products.each do |product|
product.save
end
migelid.save
end
end
end
Run
Restore
masa@masa ~/ywesee/migel_dev $ ulimit -c unlimited masa@masa ~/ywesee/migel_dev $ sudo -u postgres dropdb migel; sudo -u postgres createdb -E UTF8 -T template0 migel masa@masa ~/ywesee/migel_dev $ bin/migeld
migel> Migel::Util::Importer.new.update('data/csv/migel_de.csv','de') -> Array migel> Migel::Util::Importer.new.update('data/csv/migel_fr.csv','fr') -> Array migel> Migel::Util::Importer.new.import_all_products_from_csv('migel_product_de.csv', 'de', true)
Result
2727 / 30742 Estimate total: 41.89 [m] It will be done in: 38.18 [m] /usr/lib64/ruby/site_ruby/1.8/odba/cache.rb:324: [BUG] Segmentation fault ruby 1.8.6 (2009-06-08) [x86_64-linux] Abgebrochen (Speicherabzug geschrieben)
Note