gtxaspec / libimp-control

advanced controls for ingenic libimp
5 stars 2 forks source link

Segmentation fault with prudynt #5

Closed j3ffrw closed 6 months ago

j3ffrw commented 6 months ago

Hi, when prudynt is executed in combination with libimp_control, segmentation fault occurs. Running prudynt by itself has no segmentation fault here's

[root@ing-xiaomi-xiaofang-6264 ~]# LD_PRELOAD=/usr/lib/libimp_control.so prudynt
LIBIMP_CONTROL Version: May 16 2024_02:14:08_ constructor
[INFO:main.cpp]: PRUDYNT Video Daemon: May 16 2024 02:14:08_de67fbb4
[INFO:main.cpp]: Starting Prudynt Video Server.
[INFO:IMP.cpp]: LIBIMP Version IMP-3.12.0
[INFO:IMP.cpp]: SYSUTILS Version: SYSUTILS-3.12.0
[INFO:IMP.cpp]: CPU Information: T20-Lite
[INFO:IMP.cpp]: Sensor: jxf23
i264e[info]: profile High, level 4.0
Segmentation fault

# dmesg
[  700.986387] set sensor gpio as PA-low-10bit
[  701.137693] jxf23 0-0040: jxf23 chip found @ 0x40 (i2c0)
[  701.137715] tx_isp: Registered sensor subdevice jxf23 0-0040
[  701.719279] ###### image_tuning_v4l2_open 4218 #######
[  701.806426] do_page_fault() #2: sending SIGSEGV to prudynt for invalid write access to
[  701.806426] 00000000 
[  701.806452] epc = 774cac78 in libc.so[774ac000+b8000]
[  701.806484] ra  = 77490d3c in libimp_control.so[7748a000+1f000]

[root@ing-xiaomi-xiaofang-6264 ~]# prudynt
[INFO:main.cpp]: PRUDYNT Video Daemon: May 16 2024 02:14:08_de67fbb4
[INFO:main.cpp]: Starting Prudynt Video Server.
[INFO:IMP.cpp]: LIBIMP Version IMP-3.12.0
[INFO:IMP.cpp]: SYSUTILS Version: SYSUTILS-3.12.0
[INFO:IMP.cpp]: CPU Information: T20-Lite
[INFO:IMP.cpp]: Sensor: jxf23
i264e[info]: profile High, level 4.0
[chn0] scaler->outwidth = 640 scaler->outheight = 360, sscaler.outwidth = 0 sscaler.outheight = 0
ipu: ipu_osd,505 error ipu buffer too small
[INFO:RTSP.cpp]: stream 0 available at: rtsp://192.168.0.136/ch0

# dmesg
[   15.093037] set sensor gpio as PA-low-10bit
[   15.244774] jxf23 0-0040: jxf23 chip found @ 0x40 (i2c0)
[   15.244795] tx_isp: Registered sensor subdevice jxf23 0-0040
[   16.003476] ###### image_tuning_v4l2_open 4218 #######
[   16.643284] &&& chan1  scaler.max_width = 1920 max_height = 1080  min_width = 128 min_height = 128 &&&

[root@ing-xiaomi-xiaofang-6264 ~]# fw_printenv
baseaddr=0x80600000
baudrate=115200
bootargs=mem=${osmem} ispmem=${ispmem} rmem=${rmem} console=${serialport},${baudrate}n8 panic=${panic_timeout} root=/dev/mtdblock3 rootfstype=squashfs init=/init mtdparts=jz_sfc:256k(boot),64k(env),${kern_size}(kernel),${rootfs_size}(rootfs),-(rootfs_data)${update}
bootcmd=sf probe;sq probe;setenv setargs setenv bootargs ${bootargs};run setargs;sf read ${baseaddr} ${kern_addr} ${kern_len};bootm ${baseaddr};
bootdelay=3
disable_sd=false
ethaddr={redacted}
gatewayip=192.168.1.1
gpio_default_net=48o
ipaddr=192.168.1.10
loads_echo=1
netmask=255.255.255.0
osmem=39M@0x0
panic_timeout=10
restore=n
serialport=ttyS1
serverip=192.168.1.254
soc=t20
wlanmac={redacted}
day_night_max=8000
day_night_min=2000
disable_eth=true
enable_updates=true
gpio_button=46
gpio_default=18O 25o 26o 38o 39O 43I 46I 47o 48o 49o 51o 52o 53o 54o 62O 64i 75o 76o 79o 80o
gpio_ir940=49
gpio_ircut=25 26
gpio_led_b=39
gpio_led_y=38
gpio_mmc_cd=43
gpio_mmc_power=48o
gpio_motor_h=51 52 53 54
gpio_motor_v=75 76 79 80
gpio_speaker=63
gpio_usb_en=47
gpio_wlan=62O
ispmem=5M@0x2700000
motor_maxstep_h=2590
motor_maxstep_v=710
rmem=20M@0x2C00000
wlandev=8189fs
boot_complete=true

# cat /etc/os-release 
NAME=Thingino
ID=thingino
VERSION="1 (Ciao)"
VERSION_ID=1
VERSION_CODENAME=ciao
PRETTY_NAME="Thingino 1 (Ciao)"
ID_LIKE=buildroot
CPE_NAME="cpe:/o:thinginoproject:thingino:1"
LOGO=thingino-logo-icon
ANSI_COLOR="1;34"
HOME_URL="https://thingino.com/"
ARCHITECTURE=mips
IMAGE_ID=xiaomi_xiaofang_t20l
BUILD_ID="master+5072e47, 2024-05-21 04:21:06 -0400"
HOSTNAME=ing-xiaomi-xiaofang
TIME_STAMP=1715825648
BUILDROOT_NAME=Buildroot
BUILDROOT_VERSION=-gde67fbb4
BUILDROOT_ID=buildroot
BUILDROOT_VERSION_ID=2024.05-git
BUILDROOT_PRETTY_NAME="Buildroot 2024.05-git"
gtxaspec commented 6 months ago

have you tested a recent build, this should be fixed already =D

j3ffrw commented 6 months ago

thanks you're right its fixed on the latest BUILD_ID="master+63d88bd, 2024-05-28 04:07:17 -0400"