frappe_docker
frappe_docker copied to clipboard
Segmentation fault when installing hrms to custom image
Description of the issue
I have previously installed hrms using frappe_docker custom image installation. I attempted a re-install in the past month, and I have been getting a build error when attempting to install hrms after the clone. Installation is successful if i remove hrms from the APPS_JSON export.
h && cd /home/frappe/frappe-bench && echo "{}" > sites/common_site_config.json && find apps -mindepth 1 -path "*/.git" | xargs rm -fr" did not complete successfully: exit code: 1
Steps to reproduce the issue
-
clone frappe_docker
-
create an apps.json file and export using export APPS_JSON_BASE64=$(base64 -i ./apps.json | tr -d '\n')
./apps.json
[ { "url": "https://github.com/frappe/erpnext", "branch": "version-15" }, { "url": "https://github.com/frappe/payments", "branch": "version-15" }, { "url": "https://github.com/frappe/hrms", "branch": "version-15" } ]
-
docker build \ --build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \ --build-arg=FRAPPE_BRANCH=version-15 \ --build-arg=PYTHON_VERSION=3.11.6 \ --build-arg=NODE_VERSION=18.20.2 \ --build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \ --tag=dam1d0ck3r/bmc_images:erp-next-custom-1.1.0 \ --file=images/custom/Containerfile . \ --no-cache
Observed result
Expected result
Stacktrace / full error message if available
208.6 [output clipped, log limit 2MiB reached]
236.6 Cloning into 'erpnext'...
Updating files: 100% (4421/4421), done.
280.4 Cloning into 'payments'...
299.3 Cloning into 'hrms'...
408.3 warning " > @vitejs/[email protected]" has incorrect peer dependency "vite@^4.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/vue-3 > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning "frappe-ui > @tiptap/vue-3 > @tiptap/[email protected]" has unmet peer dependency "@tiptap/core@^2.0.0".
408.3 warning " > [email protected]" has unmet peer dependency "workbox-build@^7.0.0".
408.3 warning " > [email protected]" has unmet peer dependency "workbox-window@^7.0.0".
517.5 WARN Cannot connect to redis_cache to update assets_json
517.5 WARN Cannot connect to redis_cache to update assets_json
517.5 WARN Cannot connect to redis_cache to update assets_json
518.9 Segmentation fault
518.9 error Command failed with exit code 139.
519.0 error Command failed with exit code 139.
519.0 Error: Command failed: yarn build
519.0 at checkExecSyncError (node:child_process:890:11)
519.0 at execSync (node:child_process:962:15)
519.0 at run_build_command_for_apps (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:451:5)
519.0 at execute (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:128:23)
519.0 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
519.0 status: 139,
519.0 signal: null,
519.0 output: [ null, null, null ],
519.0 pid: 483,
519.0 stdout: null,
519.0 stderr: null
519.0 }
519.1 error Command failed with exit code 1.
519.1 Traceback (most recent call last):
519.1 File "<frozen runpy>", line 198, in _run_module_as_main
519.1 File "<frozen runpy>", line 88, in _run_code
519.1 File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
519.1 main()
519.1 File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
519.1 click.Group(commands=commands)(prog_name="bench")
519.1 File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
519.1 return self.main(*args, **kwargs)
519.1 ^^^^^^^^^^^^^^^^^^^^^^^^^^
519.1 File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1078, in main
519.1 rv = self.invoke(ctx)
519.1 ^^^^^^^^^^^^^^^^
519.1 File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
519.1 return _process_result(sub_ctx.command.invoke(sub_ctx))
519.1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
519.1 File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
519.1 return _process_result(sub_ctx.command.invoke(sub_ctx))
519.1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
519.1 File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
519.1 return ctx.invoke(self.callback, **ctx.params)
519.1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
519.1 File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 783, in invoke
519.1 return __callback(*args, **kwargs)
519.1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
519.1 File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py", line 76, in build
519.1 bundle(
519.1 File "/home/frappe/frappe-bench/apps/frappe/frappe/build.py", line 254, in bundle
519.1 frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
519.1 File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 97, in popen
519.1 raise subprocess.CalledProcessError(return_, command)
519.1 subprocess.CalledProcessError: Command 'yarn run production --run-build-command' returned non-zero exit status 1.
520.4 Aborted!
521.9 g "/home/frappe/.cache/yarn/v6/npm-plyr-3.7.8-b79bccc23687705b5d9a283b2a88c124bf7471ed-integrity/node_modules/plyr/src/sass/types/video.scss" to "/home/frappe/frappe-bench/apps/frappe/node_modules/plyr/src/sass/types/video.scss".
521.9 .... .
521.9 Getting erpnext
521.9 $ git clone https://github.com/frappe/erpnext --branch version-15 --depth 1 --origin upstream
521.9 [4/4] Building fresh packages...
521.9 $ cd frontend && yarn install --check-files
521.9 yarn install v1.22.22
521.9 [1/4] Resolving packages...
521.9 [2/4] Fetching packages...
521.9 [3/4] Linking dependencies...
521.9 [4/4] Building fresh packages...
521.9 Done in 149.69s.
521.9 Done in 154.05s.
521.9 WARN: restart failed: Couldn't find supervisorctl in PATH
521.9 $ bench build
521.9 Assets for Release v15.21.0 don't exist
Linking /home/frappe/frappe-bench/apps/frappe/node_modules to ./assets/frappe/node_modules Linking /home/frappe/frappe-bench/apps/erpnext/node_modules to ./assets/erpnext/node_modules ✔ Application Assets Linked ms/node_modules
521.9
521.9
521.9 yarn run v1.22.22
521.9 $ node esbuild --production --run-build-command
521.9 File Size
521.9
521.9 frappe/dist/js/
521.9 ├─ bootstrap-4-web.bundle.FOZOVELL.js 1.73 Kb
521.9 ├─ controls.bundle.IA3IO6IS.js 1233.47 Kb
521.9 ├─ data_import_tools.bundle.ANOCYTBE.js 126.53 Kb
521.9 ├─ desk.bundle.ZHC4CZC7.js 1341.91 Kb
521.9 ├─ dialog.bundle.FGM4UYMP.js 56.88 Kb
521.9 ├─ form.bundle.EEVDACXW.js 167.17 Kb
521.9 ├─ frappe-web.bundle.BNPO2SF6.js 829.16 Kb
521.9 ├─ libs.bundle.TIV7ZGVY.js 556.25 Kb
521.9 ├─ list.bundle.A2YVVY3Y.js 195.45 Kb
521.9 ├─ logtypes.bundle.EKN7LWKW.js 0.73 Kb
521.9 ├─ onboarding_tours.bundle.RAUR6X4Z.js 7.60 Kb
521.9 ├─ report.bundle.NKXNRCDD.js 196.97 Kb
521.9 ├─ sentry.bundle.IPS6PK2M.js 69.50 Kb
521.9 ├─ telemetry.bundle.LKEZCADB.js 2.59 Kb
521.9 ├─ user_profile_controller.bundle.ZJ6AYZ5P.js 11.96 Kb
521.9 ├─ video_player.bundle.DUYYLSFO.js 120.67 Kb
521.9 ├─ web_form.bundle.773YMCGS.js 1424.81 Kb
521.9 ├─ form_builder.bundle.B2BIJSHX.js 796.53 Kb
521.9 ├─ form_builder.bundle.AS6W75M2.css 23.02 Kb
521.9 ├─ print_format_builder.bundle.3YCNST3U.js 685.24 Kb
521.9 ├─ print_format_builder.bundle.FFVPBPB6.css 5.54 Kb
521.9 ├─ workflow_builder.bundle.7HVDLZZJ.js 351.48 Kb
521.9 ├─ workflow_builder.bundle.NCYHBU52.css 11.02 Kb
521.9 ├─ build_events.bundle.NWZ4VUUZ.js 105.71 Kb
521.9 ├─ build_events.bundle.CZHNP7YC.css 1.29 Kb
521.9 ├─ file_uploader.bundle.5SUMRMUP.js 201.83 Kb
521.9 ├─ file_uploader.bundle.WV4MAVCJ.css 6.53 Kb
521.9 └─ kanban_board.bundle.IQTBPBLP.js 578.17 Kb
521.9
521.9 erpnext/dist/js/
521.9 ├─ bank-reconciliation-tool.bundle.ALGDCWUD.js 17.17 Kb
521.9 ├─ erpnext-web.bundle.J4A2DQB4.js 0.29 Kb
521.9 ├─ erpnext.bundle.EJTSTRLK.js 216.60 Kb
521.9 ├─ item-dashboard.bundle.DFIPMDTM.js 10.24 Kb
521.9 ├─ point-of-sale.bundle.SDQCB6WE.js 92.61 Kb
521.9 └─ bom_configurator.bundle.D2UVDA3I.js 8.63 Kb
521.9
521.9 hrms/dist/js/
521.9 ├─ hierarchy-chart.bundle.VANQN5RB.js 225.55 Kb
521.9 ├─ hrms.bundle.KDEWVBDA.js 8.62 Kb
521.9 ├─ interview.bundle.C7CDEMYA.js 1.66 Kb
521.9 └─ performance.bundle.EIOXOYX5.js 3.70 Kb
521.9
521.9 frappe/dist/css/
521.9 ├─ desk.bundle.CG4UBDCZ.css 590.23 Kb
521.9 ├─ email.bundle.QAXIXHFM.css 5.97 Kb
521.9 ├─ login.bundle.KBHRFHLS.css 32.31 Kb
521.9 ├─ print.bundle.MOOKCRKO.css 203.35 Kb
521.9 ├─ print_format.bundle.WVH73DJ7.css 186.14 Kb
521.9 ├─ report.bundle.6CZQNIOB.css 5.33 Kb
521.9 ├─ web_form.bundle.T4XGABPH.css 14.69 Kb
521.9 └─ website.bundle.JS6BFWOC.css 443.00 Kb
521.9
521.9 erpnext/dist/css/
521.9 ├─ erpnext-web.bundle.VBDMJJGV.css 2.86 Kb
521.9 ├─ erpnext.bundle.3UAHD2QU.css 44.14 Kb
521.9 └─ erpnext_email.bundle.AAXS7D5O.css 0.56 Kb
521.9
521.9 hrms/dist/css/
521.9 └─ hrms.bundle.CNG5624Y.css 6.06 Kb
521.9
521.9 frappe/dist/css-rtl/
521.9 ├─ desk.bundle.OXMG36IG.css 590.73 Kb
521.9 ├─ email.bundle.5WZ5LSYO.css 5.98 Kb
521.9 ├─ login.bundle.VNCQHAMF.css 32.31 Kb
521.9 ├─ print.bundle.3AUKIOL4.css 203.51 Kb
521.9 ├─ print_format.bundle.4MMEWHAH.css 186.26 Kb
521.9 ├─ report.bundle.S3V42PFN.css 5.33 Kb
521.9 ├─ web_form.bundle.6WGX7ZYT.css 14.68 Kb
521.9 └─ website.bundle.RWTA6LKV.css 443.15 Kb
521.9
521.9 erpnext/dist/css-rtl/
521.9 ├─ erpnext-web.bundle.LNGQSTWV.css 2.87 Kb
521.9 ├─ erpnext.bundle.HE3R7CXB.css 44.13 Kb
521.9 └─ erpnext_email.bundle.UDCNMNVF.css 0.56 Kb
521.9
521.9 hrms/dist/css-rtl/
521.9 └─ hrms.bundle.VJGDWETA.css 6.07 Kb
521.9
521.9 DONE Total Build Time: 49.588s
521.9
521.9
521.9 Running build command for hrms
521.9 $ cd frontend && yarn build
521.9 $ vite build --base=/assets/hrms/frontend/ && yarn copy-html-entry
521.9 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
521.9 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
521.9 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
521.9 subprocess.CalledProcessError: Command 'bench build' returned non-zero exit status 1.
521.9
521.9 The above exception was the direct cause of the following exception:
521.9
521.9 Traceback (most recent call last):
521.9 File "/usr/local/lib/python3.11/site-packages/bench/commands/make.py", line 75, in init
521.9 init(
521.9 File "/usr/local/lib/python3.11/site-packages/bench/utils/render.py", line 105, in wrapper_fn
521.9 return fn(*args, **kwargs)
521.9 ^^^^^^^^^^^^^^^^^^^
521.9 File "/usr/local/lib/python3.11/site-packages/bench/utils/system.py", line 112, in init
521.9 build_assets(bench_path=path)
521.9 File "/usr/local/lib/python3.11/site-packages/bench/utils/bench.py", line 380, in build_assets
521.9 exec_cmd(command, cwd=bench_path, env=env)
521.9 File "/usr/local/lib/python3.11/site-packages/bench/utils/__init__.py", line 169, in exec_cmd
521.9 raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
521.9 bench.exceptions.CommandFailedError: bench build
521.9
521.9 ERROR: There was a problem while creating /home/frappe/frappe-bench
521.9 Do you want to rollback these changes? [y/N]:
------
Containerfile:111
--------------------
110 | ARG FRAPPE_PATH=https://github.com/frappe/frappe
111 | >>> RUN export APP_INSTALL_ARGS="" && \
112 | >>> if [ -n "${APPS_JSON_BASE64}" ]; then \
113 | >>> export APP_INSTALL_ARGS="--apps_path=/opt/frappe/apps.json"; \
114 | >>> fi && \
115 | >>> bench init ${APP_INSTALL_ARGS}\
116 | >>> --frappe-branch=${FRAPPE_BRANCH} \
117 | >>> --frappe-path=${FRAPPE_PATH} \
118 | >>> --no-procfile \
119 | >>> --no-backups \
120 | >>> --skip-redis-config-generation \
121 | >>> --verbose \
122 | >>> /home/frappe/frappe-bench && \
123 | >>> cd /home/frappe/frappe-bench && \
124 | >>> echo "{}" > sites/common_site_config.json && \
125 | >>> find apps -mindepth 1 -path "*/.git" | xargs rm -fr
126 |
--------------------
ERROR: failed to solve: process "/bin/sh -c export APP_INSTALL_ARGS=\"\" && if [ -n \"${APPS_JSON_BASE64}\" ]; then export APP_INSTALL_ARGS=\"--apps_path=/opt/frappe/apps.json\"; fi && bench init ${APP_INSTALL_ARGS} --frappe-branch=${FRAPPE_BRANCH} --frappe-path=${FRAPPE_PATH} --no-procfile --no-backups --skip-redis-config-generation --verbose /home/frappe/frappe-bench && cd /home/frappe/frappe-bench && echo \"{}\" > sites/common_site_config.json && find apps -mindepth 1 -path \"*/.git\" | xargs rm -fr" did not complete successfully: exit code: 1
**clipped some logs
This looks like an out of memory condition.
This looks like an out of memory condition.
please could you explain this in detail?
I am building the image on my Mac, I have assigned Docker with an 8GB RAM memory limit, 64 GB Virtual disk limit
This looks like an out of memory condition.
please could you explain this in detail?
I am building the image on my Mac, I have assigned Docker with an 8GB RAM memory limit, 64 GB Virtual disk limit
Apologies, I could be wrong then, but that error can happen in a similar moment in the build if you run out of RAM. Maybe you're having something Mac specific instead if you don't see your RAM usage going very high before it crashes.
This issue has been automatically marked as stale. You have a week to explain why you believe this is an error.