Bench update: Segmentation fault (core dumped)

Hi,

bench update is resulting in segmentation fault at the very end.
I have already tried to reboot the machine and update but i encounter the same issue. I have also made sure that i am not running low on memory. Here how it looks in the logs.

Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community

Segmentation fault (core dumped)
1 Like

You need to provide more details about your execution environment.

OS: Windows? Linux? etc…
Virtualization: OpenVZ? Docker? etc…

Hi
OS: Ubuntu 18.04
I have hosted it on digital ocean VPS.

I had this problem too. A segmentation fault on ubuntu is usually a very severe issue, that can’t be just “fixed”. I presume that something on your OS broke. While it is in this state, are you even able to reboot the system at all? I had to load a backup of a previous version.

Check if you have swap space on your server. I have faced this particular issue when swap space is not there.

Hi,

Yes i doubt the same because other instances i don’t have any problem. I am able to reboot as well. Something has gone bad but then what is it? How will i know.

All these below commands are through without any errors though

bench update --patch
bench build
bench migrate

One thing that I notice after the end of bench update, “yarn.lock” in frappe is in modified state.

edit: Suspect and check for hardware defect in memory or motherboard?

The OP is running a Digital Ocean VPS.

I’m wondering if it is OpenVZ. They can be really flaky.

OpenVZ may not allow changes to kernel parameters? Bench fails to start after a bench update - #8 by codingCoffee

I’m facing the same issue on a couple of newly installed servers.
Amazon EC2 t3.medium instance
60GB EBS volume attached

I have setup a swap file of 6GB (instance has 4GB RAM) using the link below but this hasn’t helped with the error either.

bench update --build and bench update --patch do not cause this error but bench update --requirements does

UPDATE:
Ok so these steps seem to fix the issue

  • create a virtualenv using python3 -m venv ./bench-env
  • then install bench to that virtual environment
  • then run the bench init command

Seems that it’s likely that it is something to do with permissions.

I am not facing this issue anymore with bench v5.0.0 installed using
pip3 install frappe-bench