popgenmethods / smcpp

SMC++ infers population history from whole-genome sequence data.
GNU General Public License v3.0
149 stars 34 forks source link

mremap_chunk(): invalid pointer #241

Closed zhangrengang closed 11 months ago

zhangrengang commented 1 year ago

Hi, I got a crash with log below:

$ smc++ estimate -o analysis.Group_III 1.5e-8 out.Group_III/Group_III.*.smc.gz
787 smcpp.analysis.base INFO theta: 0.000100
788 smcpp.analysis.base INFO rho: 0.000100
788 smcpp.data_filter INFO Loading data...
1512 smcpp.data_filter INFO 0.26 Gb of data
1515 smcpp.data_filter INFO 1 population
1527 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr11.smc.gz:
[63212 53405] (base pairs)
1535 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr6.smc.gz:
[ 69852 108977  51617  78967  53810  63500  74868 173820] (base pairs)
1541 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr8.smc.gz:
[ 71370  78578  58198 103230  67097 132055  57606  70360 127861 155620  78270  51242  65964  70906  69134] (base pairs)
1550 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr2.smc.gz:
[ 54946  50567  59415  77330  62944  57021  58689 130954 112085  72275] (base pairs)
1555 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr14.smc.gz:
[ 77702  58777 157086  59350] (base pairs)
1564 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr3.smc.gz:
[ 72135  93375 113474 135499 140961 144119  68061  51419  57757] (base pairs)
1572 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr5.smc.gz:
[62318 68269 72919 57380 68855] (base pairs)
1580 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr4.smc.gz:
[190011  57331  61798  54289  58217  61118] (base pairs)
1588 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr9.smc.gz:
[68228 98717 91876 75442 99880 72469] (base pairs)
1596 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr7.smc.gz:
[62653 80664 57747] (base pairs)
1602 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr10.smc.gz:
[ 73363  86357  79581  70178  70454  53571 155440  71097  72498  53822] (base pairs)
1611 smcpp.estimation_tools WARNING Long runs of homozygosity in contig out.Group_III/Group_III.Chr1.smc.gz:
[ 98696  74243 170069 122360] (base pairs)
mremap_chunk(): invalid pointer
stack trace:
  /lib64/libc.so.6 : ()+0x37400
  /lib64/libc.so.6 : gsignal()+0x10f
  /lib64/libc.so.6 : abort()+0x127
  /lib64/libc.so.6 : ()+0x7a4e7
  /lib64/libc.so.6 : ()+0x815ec
  /lib64/libc.so.6 : ()+0x819ac
  /lib64/libc.so.6 : realloc()+0x18d
  /.local/usr/lib64/libgmp.so.3 : __gmp_default_reallocate()+0x1c
  /.local/usr/lib64/libgmp.so.3 : __gmpz_realloc()+0x3a
  /.local/usr/lib64/libgmp.so.3 : __gmpz_gcd()+0x4b3
  /.local/usr/lib64/libgmp.so.3 : ()+0x226b5
  /miniconda3/envs/python3/lib/python3.8/site-packages/smcpp-1.15.4.dev18+gca077da-py3.8-linux-x86_64.egg/smcpp/_smcpp.cpython-38-x86_64-linux-gnu.so : calculate_Wnbj(int, int, int)+0x319
  /miniconda3/envs/python3/lib/python3.8/site-packages/smcpp-1.15.4.dev18+gca077da-py3.8-linux-x86_64.egg/smcpp/_smcpp.cpython-38-x86_64-linux-gnu.so : cached_matrices(int)+0xd80
  /miniconda3/envs/python3/lib/python3.8/site-packages/smcpp-1.15.4.dev18+gca077da-py3.8-linux-x86_64.egg/smcpp/_smcpp.cpython-38-x86_64-linux-gnu.so : OnePopConditionedSFS<Eigen::AutoDiffScalar<Eigen::Matrix<double, -1, 1, 0, -1, 1> > >::OnePopConditionedSFS(int)+0x47
  /miniconda3/envs/python3/lib/python3.8/site-packages/smcpp-1.15.4.dev18+gca077da-py3.8-linux-x86_64.egg/smcpp/_smcpp.cpython-38-x86_64-linux-gnu.so : OnePopInferenceManager::OnePopInferenceManager(int, std::vector<int, std::allocator<int> >, std::vector<int*, std::allocator<int*> >, std::vector<double, std::allocator<double> >, double)+0x4b
  /miniconda3/envs/python3/lib/python3.8/site-packages/smcpp-1.15.4.dev18+gca077da-py3.8-linux-x86_64.egg/smcpp/_smcpp.cpython-38-x86_64-linux-gnu.so : ()+0x5477f
  /miniconda3/envs/python3/bin/python3 : _PyObject_MakeTpCall()+0x17c
  /miniconda3/envs/python3/bin/python3 : _PyEval_EvalFrameDefault()+0x534b
  /miniconda3/envs/python3/bin/python3 : _PyFunction_Vectorcall()+0x1a6
  /miniconda3/envs/python3/bin/python3 : _PyEval_EvalFrameDefault()+0xa4b
  /miniconda3/envs/python3/bin/python3 : _PyEval_EvalCodeWithName()+0x2c3
  /miniconda3/envs/python3/bin/python3 : ()+0x1b3213
  /miniconda3/envs/python3/bin/python3 : _PyObject_MakeTpCall()+0x2eb
  /miniconda3/envs/python3/bin/python3 : _PyEval_EvalFrameDefault()+0x4f2e
  /miniconda3/envs/python3/bin/python3 : _PyFunction_Vectorcall()+0x1a6
  /miniconda3/envs/python3/bin/python3 : _PyEval_EvalFrameDefault()+0xa4b
  /miniconda3/envs/python3/bin/python3 : _PyFunction_Vectorcall()+0x1a6
  /miniconda3/envs/python3/bin/python3 : _PyEval_EvalFrameDefault()+0x92f
  /miniconda3/envs/python3/bin/python3 : _PyEval_EvalCodeWithName()+0x2c3
  /miniconda3/envs/python3/bin/python3 : PyEval_EvalCodeEx()+0x39
  /miniconda3/envs/python3/bin/python3 : PyEval_EvalCode()+0x1b
  /miniconda3/envs/python3/bin/python3 : ()+0x254a43
  /miniconda3/envs/python3/bin/python3 : ()+0x26e6b3
  /miniconda3/envs/python3/bin/python3 : ()+0x2735b2
  /miniconda3/envs/python3/bin/python3 : PyRun_SimpleFileExFlags()+0x1b2
  /miniconda3/envs/python3/bin/python3 : Py_RunMain()+0x36d
  /miniconda3/envs/python3/bin/python3 : Py_BytesMain()+0x39
  /lib64/libc.so.6 : __libc_start_main()+0xf3
  /miniconda3/envs/python3/bin/python3 : ()+0x1e9369
Aborted (core dumped)

How can I deal with it? Thank you!

terhorst commented 11 months ago

I no longer support building on Anaconda/Miniconda because of constantly running into bugs and crashes like this one. I recommend using the Docker image instead, as described in the README.