Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The DesktopEditors program crashed and reported: "free(): invalid pointer." #1748

Open
1 task done
wangannyi opened this issue Dec 9, 2024 · 1 comment
Open
1 task done
Assignees

Comments

@wangannyi
Copy link

This issue is unique.

  • I have used the search tool and did not find an issue describing my bug.

Operating System

Linux (DEB package)

Version information

8.2.0.89

Expected Behavior

Hi, i am a graduate student at a university, and recently I needed to adapt OnlyOffice DesktopEditors to RISC-V 64-bit.

Actual Behavior

I have resolved key components like CEF, V8, and others. After completing the porting, when I run the program using the command "LD_LIBRARY_PATH=./ ./DesktopEditors" in the directory build_tools/out/linux_64/onlyoffice/desktopeditors, the program crashes and reports "free(): invalid pointer." Below is the gdb information:

root@deb1-board:/home/bianbu/onlyoffice/out/out/linux_64/onlyoffice# gdb ./DesktopEditors
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1bb1) 15.0.50.20240403-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "riscv64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./DesktopEditors...
(No debugging symbols found in ./DesktopEditors)
(gdb) run
Starting program: /home/bianbu/onlyoffice/out/out/linux_64/onlyoffice/DesktopEditors
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libgdk-3.so.0
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libgobject-2.0.so.0
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libglib-2.0.so.0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/riscv64-linux-gnu/libthread_db.so.1".
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libgmodule-2.0.so.0
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libgdk_pixbuf-2.0.so.0
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libnss3.so
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libnssutil3.so
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libsmime3.so
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libcap.so.2
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libplc4.so
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libplds4.so
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libpulse.so.0
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libbrotlidec.so.1
warning: could not find '.gnu_debugaltlink' file for /usr/lib/riscv64-linux-gnu/pulseaudio/libpulsecommon-16.1.so
warning: could not find '.gnu_debugaltlink' file for /lib/riscv64-linux-gnu/libbrotlicommon.so.1
free(): invalid pointer

Program received signal SIGABRT, Aborted.
0x0000003ff4ef3b14 in __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:43
warning: 43 ./nptl/pthread_kill.c: 没有那个文件或目录
(gdb) bt
#0 0x0000003ff4ef3b14 in __pthread_kill_implementation (threadid=, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:43
#1 0x0000003ff4ef3b68 in __pthread_kill_internal (signo=6, threadid=) at ./nptl/pthread_kill.c:78
#2 0x0000003ff4eb9e74 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x0000003ff4ea9372 in __GI_abort () at ./stdlib/abort.c:79
#4 0x0000003ff4eea3ee in __libc_message_impl (fmt=fmt@entry=0x3ff4fac380 "%s\n") at ../sysdeps/posix/libc_fatal.c:132
#5 0x0000003ff4efc19c in malloc_printerr (str=str@entry=0x3ff4fa7830 "free(): invalid pointer") at ./malloc/malloc.c:5772
#6 0x0000003ff4efdf98 in _int_free (av=, p=, have_lock=have_lock@entry=0) at ./malloc/malloc.c:4507
#7 0x0000003ff4efff92 in __GI___libc_free (mem=) at ./malloc/malloc.c:3398
#8 0x0000002aaab8111a in std::locale::_Impl::~_Impl() ()
#9 0x0000002aaab812d2 in std::locale::operator=(std::locale const&) ()
#10 0x0000002aaabefe2a in std::ios_base::_M_init() ()
#11 0x0000002aaabb9be0 in std::basic_ios<char, std::char_traits >::init(std::basic_streambuf<char, std::char_traits >*) ()
#12 0x0000003fe24b68e0 in std::ios_base_library_init() () from /lib/riscv64-linux-gnu/libstdc++.so.6
#13 0x0000003fe24a4e18 in ?? () from /lib/riscv64-linux-gnu/libstdc++.so.6
#14 0x0000003ff7fdddf2 in call_init (env=0x3fffffec88, argv=0x3fffffec78, argc=1, l=) at ./elf/dl-init.c:74
#15 call_init (l=, argc=, argv=0x3fffffec78, env=0x3fffffec88) at ./elf/dl-init.c:26
#16 0x0000003ff7fddeb8 in _dl_init (main_map=0x3ff7fff260, argc=1, argv=0x3fffffec78, env=0x3fffffec88) at ./elf/dl-init.c:121
#17 0x0000003ff7feaf22 in _dl_start_user () from /lib/ld-linux-riscv64-lp64d.so.1
Backtrace stopped: frame did not save the PC

The gdb trace goes directly into the kernel layer, and I cannot trace back to the application layer functions, so I am unable to investigate further. Do you have any suggestions on where to check for this issue or if there are any additional configurations I need to make beforehand?

Reproduction Steps

No response

Additional information

V8 and CEF were cross-compiled on x86 Ubuntu 24.04, and both GCC/G++ and riscv64-linux-gnu-gcc/g++ versions are 13.2.0. OnlyOffice DesktopEditors is directly using V8 and CEF on RISC-V 64-bit Ubuntu 24.04, and the rest of the components are compiled there as well. The GCC/G++ version is also 13.2.0.

@wangannyi
Copy link
Author

and when i enable “-fsanitize=address -fno-omit-frame-pointer” flags to compile icu,“SEGV on unknown address” errors happend,is it possible that this error is causing the crash of OnlyOffice DesktopEditors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants