这是indexloc提供的服务,不要输入任何密码
Skip to content

[termux-apt] octave from TUR and other problematic unofficial packages are difficult to remove #23605

@robertkirkman

Description

@robertkirkman

Problem description

octave: no graphical display found
octave: disabling GUI features
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/bin/octave-cli-9.4.0": cannot locate symbol "_FortranAioBeginExternalListOutput" referenced by "/data/data/com.termux/files/usr/lib/octave/9.4.0/liboctave.so"...

on Android 10 and newer, but not on Android 9 or older.

Devices I have tested for this bug:

  • Galaxy S7 SM-G930U, Android 8, aarch64: not reproducible
  • the current official termux-docker on an x86 PC, Android 9, x86_64: not reproducible
  • the future update to termux-docker on an ARM PC, Android 9, aarch64: not reproducible
  • Galaxy S9 SM-G960U, Android 10, aarch64: affected
  • Galaxy A70 SM-A705FN, Android 13, aarch64: affected
  • Steam Deck OLED running bare metal Android-x86, Android 13, x86_64: affected
  • Galaxy S8+ SM-G955F, Android 14, aarch64: affected

Affects both octave and octave-x. In octave-x, the error is slightly different, but octave-x still works on Android 8 anyway, so this error also only appears on Android 10 and newer:

CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/libexec/octave/9.4.0/exec/aarch64-unknown-linux-android/octave-gui": cannot locate symbol "_ZN7Fortran7runtime20executionEnvironmentE" referenced by "/data/data/com.termux/files/usr/lib/octave/9.4.0/liboctgui.so"...

What steps will reproduce the bug?

  1. a device with Android 10 or newer (or possibly a device meeting unknown criteria that just happens to be present only among my own Android 10 or newer devices?) is required to reproduce
pkg install octave
octave

What is the expected behavior?

octave not having CANNOT LINK EXECUTABLE on Android 10 and newer

System information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=11906
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main stable main
# glibc-repo (sources.list.d/glibc.list)
deb https://packages-cf.termux.dev/apt/termux-glibc/ glibc stable
# root-repo (sources.list.d/root.list)
deb https://packages.termux.dev/apt/termux-root root stable
# x11-repo (sources.list.d/x11.list)
deb https://packages.termux.dev/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.44.6
Android version:
14
Kernel build information:
Linux localhost 4.4.302-ge001f28c408d #1 SMP PREEMPT Mon Jun 24 11:02:29 CDT 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-G955F
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.x11 versionCode:15
com.termux.api versionCode:51
TUR version (different behavior)

Running very basic, simple operations like x = 1 + 1 in octave on all devices works, but any more complex code, such as referencing an undefined variable or using the pkg function, will result in either

  • fatal: caught signal Bus error -- stopping myself... Bus error

or

  • fatal: caught signal Segmentation fault -- stopping myself... Segmentation fault

When using the octave --gui argument from octave-x, the Segmentation fault will print to stderr as "octave exited with signal 11", and the Bus error will print as "octave exited with signal 7"

This bug has existed for quite some time and does not bisect to a recent commit. I'm very sorry for not reporting it sooner, I just forgot to.

Backtrace

The octave from pkg install octave prints only this in gdb:

Thread 1 "octave-cli-9.2." received signal SIGSEGV, Segmentation fault.
0x0000007fffffe100 in ?? ()
(gdb) bt
#0  0x0000007fffffe100 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

If you manage to trigger the Bus error instead of the Segmentation fault, you can get a more populated backtrace in gdb:

Bus error backtrace
Thread 1 "octave-cli-9.2." received signal SIGBUS, Bus error.
0x0000000000000001 in ?? ()
(gdb) bt
#0  0x0000000000000001 in ?? ()
#1  0x0000007f8b5b1cc8 in ?? ()
   from /data/data/com.termux/files/usr/lib/libc++_shared.so
#2  0x0000007f8b5b19bc in ?? ()
   from /data/data/com.termux/files/usr/lib/libc++_shared.so
#3  0x0000007f8b53e3c8 in ?? ()
   from /data/data/com.termux/files/usr/lib/libc++_shared.so
#4  0x0000007f8b53e1f4 in __gxx_personality_v0 ()
   from /data/data/com.termux/files/usr/lib/libc++_shared.so
#5  0x0000007f9ac4349c in ?? ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#6  0x0000007f9ac43bd0 in ?? ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#7  0x0000007f9a5769c4 in octave::error_system::throw_error(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, std::__ndk1::list<octave::frame_info, std::__ndk1::allocator<octave::frame_info> > const&) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#8  0x0000007f9a577e30 in octave::Ferror(octave::interpreter&, octave_value_list const&, int) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#9  0x0000007f9a35baa8 in octave::tree_evaluator::execute_builtin_function(octave_builtin&, int, octave_value_list const&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#10 0x0000007f9a0b9998 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#11 0x0000007f9a152fe4 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#12 0x0000007f9a37fbe8 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#13 0x0000007f9a381da0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#14 0x0000007f9a36cb18 in octave::tree_evaluator::visit_statement(octave::tree_statement&) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#15 0x0000007f9a34ae14 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#16 0x0000007f9a36ca34 in octave::tree_evaluator::visit_statement(octave::tree_statement&) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#17 0x0000007f9a34ae14 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#18 0x0000007f9a361740 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#19 0x0000007f9a1fe7b4 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ()
--Type <RET> for more, q to quit, c to continue without paging--
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#20 0x0000007f9a37fbe8 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#21 0x0000007f9a381da0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#22 0x0000007f9a36cb18 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#23 0x0000007f9a34ae14 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#24 0x0000007f9a36ca34 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#25 0x0000007f9a34ae14 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#26 0x0000007f9a361740 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) () from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#27 0x0000007f9a1fe7b4 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#28 0x0000007f9a377ad4 in octave::tree_identifier::evaluate_n(octave::tree_evaluator&, int) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#29 0x0000007f9a3719f0 in octave::tree_identifier::evaluate(octave::tree_evaluator&, int) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#30 0x0000007f9a36cb18 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#31 0x0000007f9a34ae14 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#32 0x0000007f9a34d24c in octave::tree_evaluator::eval(std::__ndk1::shared_ptr<octave::tree_statement_list>&, bool) ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#33 0x0000007f9a357dbc in octave::tree_evaluator::repl() ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#34 0x0000007f9a8ad580 in octave::interpreter::execute() ()
   from /data/data/com.termux/files/usr/lib/octave/9.2.0/liboctinterp.so
#35 0x000000555555c804 in ?? ()
#36 0x0000007fb0ee974c in __libc_init () from /apex/com.android.runtime/lib64/bionic/libc.so
(gdb) 

What steps will reproduce the bug?

  1. Install octave (TUR)
pkg install tur-repo
pkg install octave
  1. form 1 - Segmentation fault
octave
x
  1. form 2 - Bus error
octave
pkg
  1. Control - no error
octave
x = 1 + 1

What is the expected behavior?

octave not crashing when running operations that should print a handled error, invoke a more sophisticated function, or possibly other cases.

octave:1> x
error: 'x' undefined near line 1, column 1
octave:2> 
octave:2> pkg
sh: 1: makeinfo: not found
sh: 1: makeinfo: not found
warning: print_usage: Texinfo formatting filter exited abnormally
warning: called from
    print_usage at line 81 column 5
    pkg at line 454 column 5

warning: print_usage: raw Texinfo source of help text follows...
error: Invalid call to pkg.  Correct usage is:



Additional help for built-in functions and operators is
available in the online version of the manual.  Use the command
'doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at https://www.octave.org and via the help@octave.org
mailing list.
octave:3> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions