OWFS in docker ERROR Segmentation fault (core dumped)

725 Views Asked by At

I try to run owfs inside a docker container to parse 1-wire temperature values. When running

owfs -C -uall -m /mnt/1wire --allow_other

inside the container I receive this error Segmentation fault (core dumped)

On the host system, I can run the same setup & command without problems so far: I don't know how I to debug it to find the error/solution and would appreciate hints/solutions!

My setup is the following, Dockerfile:

FROM python:3.8-slim-buster
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get upgrade -y
    
COPY ds2490 /etc/modeprobe.d/ds2490
RUN apt-get install owfs -y
RUN apt-get install libtool automake libftdi-dev libusb-dev libusb-1.0.0-dev uthash-dev -y
RUN apt-get install usbutils -y

COPY owfs.conf /etc/owfs.conf
COPY fuse.conf /etc/fuse.conf
RUN mkdir /mnt/1wire

WORKDIR onewire
COPY ./docker_entrypoint.sh ./docker_entrypoint.sh
RUN chmod +x ./docker_entrypoint.sh
COPY ./parse_onewire.py ./parse_onewire.py
RUN chmod +x parse_onewire.py

ENTRYPOINT ./docker_entrypoint.sh

docker-compose.yml:

version: "3"
services:
  onewire_parser:
    container_name: 'onewire'
    build: .
    volumes:
      - /dev/bus/usb:/dev/bus/usb
    privileged: true
    stdin_open: true
    tty: true
    restart: unless-stopped

ds2490:

blacklist ds2490
blacklist ds9490r
blacklist wire

fuse.conf:

#Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000

# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#

user_allow_other

owfs.conf:

######################## SOURCES ########################
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
# USB device: DS9490
server: usb = all
# Serial port: DS9097
#server: device = /dev/ttyS1
# owserver tcp address
#server: server = 192.168.10.1:3131
# random simulated device
#server: FAKE = DS18S20,DS2405
######################### OWFS ##########################
mountpoint = /mnt/1wire
allow_other
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
ftp: port = 2120
####################### OWSERVER ########################
server: port = localhost:4304

docker_entrypoint.sh:

#!/bin/bash
owfs -C -uall -m /mnt/1wire --allow_other
1

There are 1 best solutions below

0
On

I'm not quite sure why, but changing the mount direction from /mnt/1wire to /opt/1wire solved the issue. I left everything else as mentioned in the original post.

Maybe someone can explain this?