Segmentation fault (core dumped) during install/setup of NodeBB v1.10.2



  • Yesterday I started running into trouble with my NodeBB (v1.10.2) install. Previously I had it working. I tried installing the db search plugin using the admin panel in the web app and restarted and ever since then I've had problems.

    NODE VERSION=v10.6.0
    NPM_VERSION=6.4.0

    I'm actually running NodeBB in a docker container and its mongo database in another container. I have a script which identifies the ip address of the mongo container (stored in variable $nodebbmongodb_ip_address) and then launches NodeBB. The relevant lines of the script are:

    echo '{"url": "https://xxx.xxx.xxx.com","secret": "xxxxxxxxxxxxxxxxxxx","database": "mongo","mongo": {"host": "'$nodebbmongodb_ip_address'","port": "47017","password": "xxx","database": "nodebb"}}' >/nodebb/config.json
    /nodebb/nodebb upgrade
    echo '{"url": "https://xxx.xxx.xxx.com","secret": "xxxxxxxxxxxxxxxxxxx","database": "mongo","mongo": {"host": "'$nodebbmongodb_ip_address'","port": "47017","password": "xxx","database": "nodebb"}}' >/nodebb/config.json
    node app --setup= '{"url": "https://xxx.xxx.xxx.com","secret": "xxxxxxxxxxxxxxxxxxx","database": "mongo","mongo": {"host": "'$nodemongodb_ip_address'","port": "47017","password": "xxx","database": "nodebb"},"admin:username": "xxx","admin:password": "xxx","admin:password:confirm": "xxx","admin:email": "xxx@xxx.com"}'
    /nodebb/nodebb start
    

    I know that's all a bit of a mess....basically it resulted from a lot of trial and error (trying to avoid errors if I didn't upgrade; trying to avoid the annoying "warn: You have no mongo username/password setup!" error that you see below).

    Anyway, as of yesterday I started getting the segmentation error below. I've tried reverting back to a working snapshot (which relaunches the script above) and increasing memory....and a whole lot of other things....No luck!

    Here is the log from the NodeBB container after relaunching/upgrading with my startup script today:

    package.json not found.
    Populating package.json...
    OK
    Installing them now...
    
    Dependencies outdated or not yet installed.
    npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
    npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
    
    > benchpressjs@1.2.6 install /nodebb/node_modules/benchpressjs
    > cd rust/benchpress-rs && npm install
    
    npm WARN lifecycle benchpress-rs@0.1.0~install: cannot run in wd benchpress-rs@0.1.0 neon build >> build.log 2>&1 || exit 0 (wd=/nodebb/node_modules/benchpressjs/rust/benchpress-rs)
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 86 packages from 83 contributors and audited 123 packages in 3.243s
    found 0 vulnerabilities
    
    
    > sharp@0.21.0 install /nodebb/node_modules/sharp
    > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
    
    info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-linuxmusl-x64.tar.gz
    
    > preact@8.3.1 postinstall /nodebb/node_modules/preact
    > node -e "console.log('\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[0m')"
    
    Love Preact? You can now donate to our open collective:
     > https://opencollective.com/preact/donate
    npm notice created a lockfile as package-lock.json. You should commit this file.
    npm WARN eslint-config-airbnb-base@12.1.0 requires a peer of eslint@^4.9.0 but none is installed. You must install peer dependencies yourself.
    npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
    
    added 619 packages from 740 contributors and audited 2673 packages in 38.335s
    found 5 vulnerabilities (1 low, 4 moderate)
      run `npm audit fix` to fix them, or `npm audit` for details
    OK
    
    
    Updating NodeBB...
    
    1. Updating package.json file with defaults...  OK
    
    2. Bringing base dependencies up to date...  started
    audited 2673 packages in 5.783s
    found 5 vulnerabilities (1 low, 4 moderate)
      run `npm audit fix` to fix them, or `npm audit` for details
    
    3. Checking installed plugins for updates...2018-11-06T03:47:04.940Z [14] - warn: You have no mongo username/password setup!
      OK
    [benchpressjs] Unable to build or find a suitable native module, falling back to JS version
    4. Updating NodeBB data store schema...2018-11-06T03:47:06.360Z [14] - warn: You have no mongo username/password setup!
    2018-11-06T03:47:06.382Z [14] - warn: [cache-buster] could not read cache buster message=ENOENT: no such file or directory, open '/nodebb/build/cache-buster', stack=Error: ENOENT: no such file or directory, open '/nodebb/build/cache-buster', errno=-2, code=ENOENT, syscall=open, path=/nodebb/build/cache-buster
    
    Parsing upgrade scripts... 
    OK | 0 script(s) found, 64 skipped
    Schema update complete!
    
    
    5. Rebuilding assets...  started
    2018-11-06T03:47:06.423Z [14] - warn: You have no mongo username/password setup!
    2018-11-06T03:47:06.460Z [14] - info: [build] Building in parallel mode
    2018-11-06T03:47:06.461Z [14] - info: [build]         plugin static dirs  build started
    2018-11-06T03:47:06.463Z [14] - info: [build]          requirejs modules  build started
    2018-11-06T03:47:06.464Z [14] - info: [build]           client js bundle  build started
    2018-11-06T03:47:06.465Z [14] - info: [build]            admin js bundle  build started
    2018-11-06T03:47:06.466Z [14] - info: [build]         client side styles  build started
    2018-11-06T03:47:06.467Z [14] - info: [build] admin control panel styles  build started
    2018-11-06T03:47:06.468Z [14] - info: [build]                  templates  build started
    2018-11-06T03:47:06.468Z [14] - info: [build]                  languages  build started
    2018-11-06T03:47:06.469Z [14] - info: [build]                     sounds  build started
    2018-11-06T03:47:06.583Z [14] - info: [build]                     sounds  build completed in 0.114sec
    2018-11-06T03:47:06.585Z [14] - info: [build]         plugin static dirs  build completed in 0.124sec
    2018-11-06T03:47:30.467Z [14] - info: [build]         client side styles  build completed in 24.001sec
    2018-11-06T03:47:32.302Z [14] - info: [build]                  languages  build completed in 25.834sec
    2018-11-06T03:47:39.650Z [14] - info: [build]           client js bundle  build completed in 33.185sec
    2018-11-06T03:47:39.651Z [14] - info: [build]            admin js bundle  build completed in 33.186sec
    2018-11-06T03:47:44.160Z [14] - info: [build] admin control panel styles  build completed in 37.693sec
    2018-11-06T03:47:45.427Z [14] - info: [build]                  templates  build completed in 38.959sec
    2018-11-06T03:47:46.060Z [14] - info: [build]          requirejs modules  build completed in 39.597sec
    2018-11-06T03:47:46.061Z [14] - info: [build] Asset compilation successful. Completed in 39.601sec.
    
    
      NodeBB Upgrade Complete!
    
    2018-11-06T03:47:46.654Z [111] - info: NodeBB v1.10.2 Copyright (C) 2013-2018 NodeBB Inc.
    2018-11-06T03:47:46.656Z [111] - info: This program comes with ABSOLUTELY NO WARRANTY.
    2018-11-06T03:47:46.657Z [111] - info: This is free software, and you are welcome to redistribute it under certain conditions.
    2018-11-06T03:47:46.657Z [111] - info:  
    2018-11-06T03:47:46.735Z [111] - info: Initializing NodeBB v1.10.2 https://xxx.xxx.xxx.com
    2018-11-06T03:47:46.848Z [111] - warn: You have no mongo username/password setup!
    [benchpressjs] Unable to build or find a suitable native module, falling back to JS version
    Segmentation fault (core dumped)
    
    Starting NodeBB
      "./nodebb stop" to stop the NodeBB server
      "./nodebb log" to view server output
      "./nodebb help" for more commands
    

    Any suggestions?



  • @quokka said in Segmentation fault (core dumped) during install/setup of NodeBB v1.10.2:

    trying to avoid the annoying "warn: You have no mongo username/password setup!" error that you see below).

    That is already patched.
    https://github.com/NodeBB/NodeBB/issues/6890



  • The "Segmentation fault (core dumped)" error disappeared today after rebuilding my container with this additional line added to my Dockerfile after installing NodeBB:

    RUN npm install benchpressjs@1.2.7
    

    👍

    Not 100% sure that's the reason its fixed....but anyway it's gone..


  • Admin

    Thanks for following up!!


 

Suggested Topics

| |