Giter Club home page Giter Club logo

Comments (5)

saleyn avatar saleyn commented on August 30, 2024

Can you upgrade the OTP to 27 and reproduce it there? You may need to compile a non-optimized build in order to see the stacktrace by setting OPTIMIZE=false make.

from erlexec.

kape1395 avatar kape1395 commented on August 30, 2024

Upgrading OTP is not easy there. I will try to run this with OPTIMIZE=false make and valgrind enabled.
Do you think that might be related to the OTP version?
The failures happen now once a day or a week, and I can't find a way yet to reproduce them reliably.

from erlexec.

saleyn avatar saleyn commented on August 30, 2024

Not sure. It has been running pretty stably in many uses.

from erlexec.

kape1395 avatar kape1395 commented on August 30, 2024

That's the valgrind's memory detector output.
Unfortunately, I still don't have the Erlexec debug output; it was not written to a file.

==401359== Memcheck, a memory error detector
==401359== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==401359== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==401359== Command: /.../lib/erlexec-2.0.6/priv/x86_64-linux-gnu/exec-port
==401359== Parent PID: 401339
==401359==
==403175== Syscall param ioctl(TCSET{S,SW,SF}) points to uninitialised byte(s)
==403175==    at 0x4C77850: tcsetattr (tcsetattr.c:83)
==403175==    by 0x119440: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:568)
==403175==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==403175==    by 0x10D5B9: main (exec.cpp:291)
==403175==  Address 0x1ffefff6f0 is on thread 1's stack
==403175==  in frame #0, created by tcsetattr (tcsetattr.c:45)
==403175==
==403175== Conditional jump or move depends on uninitialised value(s)
==403175==    at 0x1195A3: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:581)
==403175==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==403175==    by 0x10D5B9: main (exec.cpp:291)
==403175==
==404561== Syscall param ioctl(TCSET{S,SW,SF}) points to uninitialised byte(s)
==404561==    at 0x4C77850: tcsetattr (tcsetattr.c:83)
==404561==    by 0x119440: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:568)
==404561==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==404561==    by 0x10D5B9: main (exec.cpp:291)
==404561==  Address 0x1ffefff6f0 is on thread 1's stack
==404561==  in frame #0, created by tcsetattr (tcsetattr.c:45)
==404561==
==404561== Conditional jump or move depends on uninitialised value(s)
==404561==    at 0x1195A3: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:581)
==404561==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==404561==    by 0x10D5B9: main (exec.cpp:291)
==404561==
==404561== Conditional jump or move depends on uninitialised value(s)
==404561==    at 0x1195AC: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:581)
==404561==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==404561==    by 0x10D5B9: main (exec.cpp:291)
==404561==
==404561== Syscall param ioctl(TIOCSWINSZ) points to uninitialised byte(s)
==404561==    at 0x4C78277: ioctl (syscall-template.S:120)
==404561==    by 0x1145C4: ei::set_winsz(int, int, int) (exec_impl.cpp:182)
==404561==    by 0x1195C5: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:582)
==404561==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==404561==    by 0x10D5B9: main (exec.cpp:291)
==404561==  Address 0x1ffefff740 is on thread 1's stack
==404561==  in frame #1, created by ei::set_winsz(int, int, int) (exec_impl.cpp:177)
==404561==
==405903== Syscall param ioctl(TCSET{S,SW,SF}) points to uninitialised byte(s)
==405903==    at 0x4C77850: tcsetattr (tcsetattr.c:83)
==405903==    by 0x119440: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:568)
==405903==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==405903==    by 0x10D5B9: main (exec.cpp:291)
==405903==  Address 0x1ffefff6f0 is on thread 1's stack
==405903==  in frame #0, created by tcsetattr (tcsetattr.c:45)
==405903==
==405903== Conditional jump or move depends on uninitialised value(s)
==405903==    at 0x1195A3: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:581)
==405903==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==405903==    by 0x10D5B9: main (exec.cpp:291)
==405903==
==405903== Conditional jump or move depends on uninitialised value(s)
==405903==    at 0x1195AC: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:581)
==405903==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==405903==    by 0x10D5B9: main (exec.cpp:291)
==405903==
==405903== Syscall param ioctl(TIOCSWINSZ) points to uninitialised byte(s)
==405903==    at 0x4C78277: ioctl (syscall-template.S:120)
==405903==    by 0x1145C4: ei::set_winsz(int, int, int) (exec_impl.cpp:182)
==405903==    by 0x1195C5: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:582)
==405903==    by 0x10DCD0: process_command(bool) (exec.cpp:398)
==405903==    by 0x10D5B9: main (exec.cpp:291)
==405903==  Address 0x1ffefff740 is on thread 1's stack
==405903==  in frame #1, created by ei::set_winsz(int, int, int) (exec_impl.cpp:177)
==405903==

from erlexec.

kape1395 avatar kape1395 commented on August 30, 2024

It looks like it's pty related. Here is a simple case to reproduce:

1> exec:run("/usr/bin/echo asd", [sync, stdout, stderr, pty]).
exec got msg from port: {1,{pid,74130}}
exec added monitor <0.87.0> for OsPid 74130exec got msg from port: {0,{stdout,74130,<<"asd\r\n">>}}
exec got msg from port: {0,{exit_status,74130,0}}
Pid 74130 exited with status: {0,0}
<0.87.0> 74130 got down message ({status,0}) (ismon=true)
{ok,[{stdout,[<<"asd\r\n">>]}]}

Results in valgrind report:

==74130== Syscall param ioctl(TCSET{S,SW,SF}) points to uninitialised byte(s)
==74130==    at 0x4C46D10: tcsetattr (tcsetattr.c:83)
==74130==    by 0x11DC65: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:568)
==74130==    by 0x1121BA: process_command(bool) (exec.cpp:398)
==74130==    by 0x10DBC1: main (exec.cpp:291)
==74130==  Address 0x1ffeffe300 is on thread 1's stack
==74130==  in frame #0, created by tcsetattr (tcsetattr.c:45)
==74130== 
==74130== Conditional jump or move depends on uninitialised value(s)
==74130==    at 0x11CE50: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:581)
==74130==    by 0x1121BA: process_command(bool) (exec.cpp:398)
==74130==    by 0x10DBC1: main (exec.cpp:291)
==74130== 
==74130== Syscall param ioctl(TIOCSWINSZ) points to uninitialised byte(s)
==74130==    at 0x4C4EDED: ioctl (ioctl.c:36)
==74130==    by 0x1151FD: ei::set_winsz(int, int, int) (exec_impl.cpp:182)
==74130==    by 0x11CE58: ei::start_child(ei::CmdOptions&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) (exec_impl.cpp:582)
==74130==    by 0x1121BA: process_command(bool) (exec.cpp:398)
==74130==    by 0x10DBC1: main (exec.cpp:291)
==74130==  Address 0x1ffeffe340 is on thread 1's stack
==74130==  in frame #1, created by ei::set_winsz(int, int, int) (exec_impl.cpp:177)

In my case, it's not critical to use the pty option. It was used accidentally. But I hope that helps.

from erlexec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.