On Tue, 2021-03-02 16:27:27 +0100, meskio <mes...@sindominio.net> wrote:
> Quoting Jan-Benedict Glaw (2021-03-02 14:44:33)
> > > If you are able to test your laminar with systemd tell me if your problem 
> > > persist there.
> > 
> > I'll try to pin down in which circumstances this actually happens.
> 
> Good luck with it. If you don't find anything we can open an issue upstream, 
> Oliver is pretty responsive and helpful.

SIGPIPE was a red herring, it happens ever so often and is ignored.
But there's a SIGSEGV:

(gdb) run -v
Starting program: /usr/sbin/laminard -v
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
laminard version 1.0 started
rpc.cpp:55: info: RPC queue; jobName = binutils-vax-linux-gnu
[Detaching after fork from child process 21674]
laminar.cpp:672: info: Started job; run->name = binutils-vax-linux-gnu; 
run->build = 8; ctx->name = default

Program received signal SIGSEGV, Segmentation fault.
Http::notifyLog (this=this@entry=0x55555560aa10, job="binutils-vax-linux-gnu", 
run=run@entry=8, log_chunk="", eot=<optimized out>, eot@entry=false) at 
/usr/include/kj/memory.h:224
224     in /usr/include/kj/memory.h
(gdb) bt
#0  Http::notifyLog (this=this@entry=0x55555560aa10, 
job="binutils-vax-linux-gnu", run=run@entry=8, log_chunk="", eot=<optimized 
out>, eot@entry=false) at /usr/include/kj/memory.h:224
#1  0x000055555557ccd9 in operator() (n=<optimized out>, b=<optimized out>, 
__closure=0x7fffffffd020) at ./src/laminar.cpp:659
#2  std::__invoke_impl<void, Laminar::tryStartRun(std::shared_ptr<Run>, 
int)::<lambda(char const*, size_t)>&, char const*, long unsigned int> (__f=...) 
at /usr/include/c++/10/bits/invoke.h:60
#3  std::__invoke_r<void, Laminar::tryStartRun(std::shared_ptr<Run>, 
int)::<lambda(char const*, size_t)>&, char const*, long unsigned int> 
(__fn=...) at /usr/include/c++/10/bits/invoke.h:110
#4  std::_Function_handler<void(char const*, long unsigned int), 
Laminar::tryStartRun(std::shared_ptr<Run>, int)::<lambda(char const*, size_t)> 
>::_M_invoke(const std::_Any_data &, const char *&&, unsigned long &&) 
(__functor=..., __args#0=<optimized out>, 
    __args#1=<optimized out>) at /usr/include/c++/10/bits/std_function.h:291
#5  0x00005555555bb11d in std::function<void (char const*, unsigned 
long)>::operator()(char const*, unsigned long) const (__args#1=<optimized out>, 
__args#0=<optimized out>, this=0x555555859778) at 
/usr/include/c++/10/bits/std_function.h:622
#6  operator() (__closure=0x555555859760, sz=<optimized out>) at 
./src/server.cpp:151
#7  0x00005555555bc219 in kj::_::MaybeVoidCaller<unsigned long, 
kj::Promise<void> >::apply<Server::handleFdRead(kj::AsyncInputStream*, char*, 
std::function<void(char const*, long unsigned int)>)::<lambda(size_t)> > 
(in=@0x7fffffffd568: 4, func=...)
    at /usr/include/kj/async-prelude.h:134
#8  kj::_::TransformPromiseNode<kj::Promise<void>, long unsigned int, 
Server::handleFdRead(kj::AsyncInputStream*, char*, std::function<void(char 
const*, long unsigned int)>)::<lambda(size_t)>, 
kj::_::PropagateException>::getImpl(kj::_::ExceptionOrValue &) (
    this=0x555555859740, output=...) at /usr/include/kj/async-inl.h:401
#9  0x00007ffff7cd1502 in 
kj::_::TransformPromiseNodeBase::<lambda()>::operator() 
(__closure=0x7fffffffd928, __closure=0x7fffffffd928) at src/kj/async.c++:703
#10 
kj::_::RunnableImpl<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::<lambda()>
 >::run(void) (this=0x7fffffffd920) at src/kj/exception.h:302
#11 0x00007ffff7c4af9b in kj::_::runCatchingExceptions (runnable=warning: RTTI 
symbol not found for class 
'kj::_::RunnableImpl<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::{lambda()#1}>'
...) at src/kj/exception.c++:1023
#12 0x00007ffff7cd06fa in 
kj::runCatchingExceptions<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::<lambda()>
 > (func=...) at src/kj/common.h:514
#13 kj::_::TransformPromiseNodeBase::get (this=<optimized out>, output=...) at 
src/kj/async.c++:703
#14 0x00007ffff7cd51e9 in kj::_::ChainPromiseNode::fire (this=0x5555558a3ba0) 
at src/kj/async.c++:855
#15 0x00007ffff7cd0e3c in kj::EventLoop::turn (this=0x555555609f98) at 
src/kj/async.c++:373
#16 0x00007ffff7cd60c5 in kj::_::waitImpl (node=..., result=..., waitScope=...) 
at src/kj/async.c++:440
#17 0x00005555555ba1cc in kj::Promise<void>::wait (waitScope=..., 
this=0x7fffffffe490) at /usr/include/kj/async-inl.h:902
#18 Server::start (this=0x55555560a1e0) at ./src/server.cpp:56
#19 0x000055555557aeba in main (argc=<optimized out>, argv=<optimized out>) at 
./src/main.cpp:98



(gdb) bt full
#0  Http::notifyLog (this=this@entry=0x55555560aa10, 
job="binutils-vax-linux-gnu", run=run@entry=8, log_chunk="", eot=<optimized 
out>, eot@entry=false) at /usr/include/kj/memory.h:224
        lw = 0x55555585f290
        __for_range = std::set with 1 element = {[0] = 0x55555585f290}
Python Exception <class 'gdb.error'> value has been optimized out:
        __for_begin =
Python Exception <class 'gdb.error'> value has been optimized out:
        __for_end =
#1  0x000055555557ccd9 in operator() (n=<optimized out>, b=<optimized out>, 
__closure=0x7fffffffd020) at ./src/laminar.cpp:659
        s = "yes\n"
        run = <error reading variable: Cannot access memory at address 0x1e>
        this = 0x55555564b310
Python Exception <class 'gdb.error'> value has been optimized out:
        run =
        this = <optimized out>
Python Exception <class 'gdb.error'> value has been optimized out: 
        s = 
#2  std::__invoke_impl<void, Laminar::tryStartRun(std::shared_ptr<Run>, 
int)::<lambda(char const*, size_t)>&, char const*, long unsigned int> (__f=...) 
at /usr/include/c++/10/bits/invoke.h:60
No locals.
#3  std::__invoke_r<void, Laminar::tryStartRun(std::shared_ptr<Run>, 
int)::<lambda(char const*, size_t)>&, char const*, long unsigned int> 
(__fn=...) at /usr/include/c++/10/bits/invoke.h:110
No locals.
#4  std::_Function_handler<void(char const*, long unsigned int), 
Laminar::tryStartRun(std::shared_ptr<Run>, int)::<lambda(char const*, size_t)> 
>::_M_invoke(const std::_Any_data &, const char *&&, unsigned long &&) 
(__functor=..., __args#0=<optimized out>, 
    __args#1=<optimized out>) at /usr/include/c++/10/bits/std_function.h:291
No locals.
#5  0x00005555555bb11d in std::function<void (char const*, unsigned 
long)>::operator()(char const*, unsigned long) const (__args#1=<optimized out>, 
__args#0=<optimized out>, this=0x555555859778) at 
/usr/include/c++/10/bits/std_function.h:622
No locals.
#6  operator() (__closure=0x555555859760, sz=<optimized out>) at 
./src/server.cpp:151
        cb = {<std::_Maybe_unary_or_binary_function<void, char const*, unsigned 
long>> = {<std::binary_function<char const*, unsigned long, void>> = {<No data 
fields>}, <No data fields>}, <std::_Function_base> = {static _M_max_size = 16, 
static _M_max_align = 8, 
            _M_functor = {_M_unused = {_M_object = 0x555555891eb0, 
_M_const_object = 0x555555891eb0, _M_function_pointer = 0x555555891eb0, 
_M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * 
const)) 0x555555891eb0, this adjustment 25}, 
              _M_pod_data = 
"\260\036\211UUU\000\000\031\000\000\000\000\000\000"}, 
            _M_manager = 0x5555555824c0 <std::_Function_handler<void(char 
const*, long unsigned int), Laminar::tryStartRun(std::shared_ptr<Run>, 
int)::<lambda(char const*, size_t)> >::_M_manager(std::_Any_data &, const 
std::_Any_data &, std::_Manager_operation)>}, 
          _M_invoker = 0x55555557cc00 <std::_Function_handler<void(char const*, 
long unsigned int), Laminar::tryStartRun(std::shared_ptr<Run>, 
int)::<lambda(char const*, size_t)> >::_M_invoke(const std::_Any_data &, const 
char *&&, unsigned long &&)>}
        buffer = 0x555555656380 "yes\nking for string.h... .  SI C header 
files... .. .. ched) sr/lib/gcc/x86_64-linux-gnu/10/liblto_plugin.so\nor\ne[2]: 
Nothing to be done for 'all'.\nmake[2]: Leaving directory 
'/var/lib/laminar/run/bin"...
        stream = 0x555555669330
        this = 0x55555560a1e0
#7  0x00005555555bc219 in kj::_::MaybeVoidCaller<unsigned long, 
kj::Promise<void> >::apply<Server::handleFdRead(kj::AsyncInputStream*, char*, 
std::function<void(char const*, long unsigned int)>)::<lambda(size_t)> > 
(in=@0x7fffffffd568: 4, func=...)
    at /usr/include/kj/async-prelude.h:134
No locals.
#8  kj::_::TransformPromiseNode<kj::Promise<void>, long unsigned int, 
Server::handleFdRead(kj::AsyncInputStream*, char*, std::function<void(char 
const*, long unsigned int)>)::<lambda(size_t)>, 
kj::_::PropagateException>::getImpl(kj::_::ExceptionOrValue &) (
    this=0x555555859740, output=...) at /usr/include/kj/async-inl.h:401
        depValue = 0x7fffffffd568
        depException = 0x0
        depResult = {<kj::_::ExceptionOrValue> = {exception = {ptr = {isSet = 
false, {value = {ownFile = {content = {ptr = 0x55555584c8d0 "P\371\210UUU", 
size_ = 140737351166208, disposer = 0x0}}, file = 0x0, line = 0, type = 
kj::Exception::Type::FAILED, description = {
                      content = {ptr = 0x7ffff7d2a91e "kj/async-io-unix.c++", 
size_ = 8589934971, disposer = 0x0}}, context = {ptr = {disposer = 0x0, ptr = 
0x5555555f4730 <kj::_::HeapArrayDisposer::instance>}}, trace = {0x0, 0x0, 
0x7ffff7dccdc5
     <kj::_::TransformPromiseNode<kj::Promise<void>, kj::_::Void, 
kj::(anonymous namespace)::HttpOutputStream::writeBodyData(kj::ArrayPtr<const 
kj::ArrayPtr<unsigned char const> >)::<lambda()>, 
kj::_::PropagateException>::getImpl(kj::_::ExceptionOrValue &)+1925>, 
                      0x7ffff7cd1501 
<kj::_::RunnableImpl<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::<lambda()>
 >::run(void)+17>, 0x7ffff7d91d70 <kj::(anonymous 
namespace)::HttpOutputStream::<lambda()>::operator()(void) const>, 
                      0x55555559f9d0 <operator()() const>, 
                      0x7ffff7df5d90 
<kj::CaptureByMove<kj::HttpServer::Connection::loop(bool)::{lambda(kj::Maybe<kj::HttpHeaders::Request>&&)#4}::operator()(kj::Maybe<kj::HttpHeaders::Request>&&)
 const::{lambda(kj::Own<kj::AsyncInputStream>)#3}, 
kj::Own<kj::AsyncInputStream> >::operator()<>()>, 0x7ffff7de3040 
<kj::_::IdentityFunc<kj::Promise<bool> >::operator()(bool&&) const>, 
0x7ffff7cd60c4 <kj::_::waitImpl(kj::Own<kj::_::PromiseNode>&&, 
kj::_::ExceptionOrValue&, kj::WaitScope&)+148>, 0x5555555ba1cb 
<Server::start()+267>, 
                      0x55555557aeb9 <main(int, char**)+585>, 0x7ffff75cad09 
<__libc_start_main+233>, 0x55555557b0d9 <_start+41>, 0xfffffff500000005, 
0xfffffff5, 0xfffffff4, 0x10, 0x40000000000, 0x1300000005, 0x0, 0x0, 
0x55555565b328, 0xfffffffffffffffe, 0x0, 0x1, 
                      0xc8003600000300, 0x0, 0x5555556284f8, 0x0, 0x1, 
0x5555555f31c0 <kj::_::HeapDisposer<kj::_::ChainPromiseNode>::instance>, 0x0}, 
traceCount = 1432727144}}}}}, value = {ptr = {isSet = true, {value = 4}}}}
#9  0x00007ffff7cd1502 in 
kj::_::TransformPromiseNodeBase::<lambda()>::operator() 
(__closure=0x7fffffffd928, __closure=0x7fffffffd928) at src/kj/async.c++:703
        output = <optimized out>
        this = <optimized out>
        output = <optimized out>
        this = <optimized out>
#10 
kj::_::RunnableImpl<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::<lambda()>
 >::run(void) (this=0x7fffffffd920) at src/kj/exception.h:302
No locals.
#11 0x00007ffff7c4af9b in kj::_::runCatchingExceptions (runnable=warning: RTTI 
symbol not found for class 
'kj::_::RunnableImpl<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::{lambda()#1}>'
...) at src/kj/exception.c++:1023
No locals.
#12 0x00007ffff7cd06fa in 
kj::runCatchingExceptions<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::<lambda()>
 > (func=...) at src/kj/common.h:514
        runnable = {<kj::_::Runnable> = {_vptr.Runnable = 0x7ffff7d443b8 
<vtable for 
kj::_::RunnableImpl<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::{lambda()#1}>+16>},
 func = {__output = @0x7fffffffdf20, __this = 0x555555859740}}
#13 kj::_::TransformPromiseNodeBase::get (this=<optimized out>, output=...) at 
src/kj/async.c++:703
        exception = {isSet = false, {value = {ownFile = {content = {ptr = 0x0, 
size_ = 0, disposer = 0x0}}, file = 0x7ffff7d2a91e "kj/async-io-unix.c++", line 
= 379, type = kj::Exception::Type::DISCONNECTED, description = {content = {ptr 
= 0x0, size_ = 0,
                  disposer = 0x5555555f4730 
<kj::_::HeapArrayDisposer::instance>}}, context = {ptr = {disposer = 0x0, ptr = 
0x0}}, trace = {
                0x7ffff7dccdc5 <kj::_::TransformPromiseNode<kj::Promise<void>, 
kj::_::Void, kj::(anonymous 
namespace)::HttpOutputStream::writeBodyData(kj::ArrayPtr<const 
kj::ArrayPtr<unsigned char const> >)::<lambda()>, 
kj::_::PropagateException>::getImpl(kj::_::ExceptionOrValue &)+1925>, 
0x7ffff7cd1501 
<kj::_::RunnableImpl<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::<lambda()>
 >::run(void)+17>, 0x7ffff7c4af9a 
<kj::_::runCatchingExceptions(kj::_::Runnable&)+42>,
                0x7ffff7cd06f9 
<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)+73>, 
0x7ffff7cd51e8 <kj::_::ChainPromiseNode::fire()+88>, 0x7ffff7cd0e3b 
<kj::EventLoop::turn()+107>, 0x67caa3d45d89cb00, 0x5555555ba1cb 
<Server::start()+267>, 0x5555558e80d8,
                0x55555585abc0, 0x7fffffffddc0, 0x7fffffffddc0, 0x7fffffffdf20, 
0x7fffffffe670, 0x67caa3d45d89cb00, 0x7fffffffdd00, 0x555555644780, 
0x7fffffffe0d0, 0x7fffffffddc0, 0x7fffffffddc0, 0x7fffffffdf20, 0x7fffffffe670,
                0x7ffff7c4af9b 
<kj::_::runCatchingExceptions(kj::_::Runnable&)+43>, 0x7fffffffe670, 
0x7ffff7c4af9b <kj::_::runCatchingExceptions(kj::_::Runnable&)+43>, 
0x5555556284f8, 0x67caa3d45d89cb00, 0x3, 0x555555882260, 0x555555882260, 
0x55555587a290,
                0x7fffffffdf40}, traceCount = 4157415077}}}
#14 0x00007ffff7cd51e9 in kj::_::ChainPromiseNode::fire (this=0x5555558a3ba0) 
at src/kj/async.c++:855
        intermediate = {<kj::_::ExceptionOrValue> = {exception = {ptr = {isSet 
= false, {value = {ownFile = {content = {ptr = 0x555555860e58 "\020\200_UUU", 
size_ = 140737488347360, disposer = 0x7ffff7cd44e8 
<kj::_::ExclusiveJoinPromiseNode::Branch::fire()+104>}},
                    file = 0x7ffff7d44400 <vtable for 
kj::_::RunnableImpl<kj::_::ForkHubBase::fire()::{lambda()#1}>+16> 
"P\373\314\367\377\177", line = 1434848856, type = 21845, description = 
{content = {ptr = 0x0, size_ = 0,
                        disposer = 0x5555555f4730 
<kj::_::HeapArrayDisposer::instance>}}, context = {ptr = {disposer = 0x0, ptr = 
0x0}}, trace = {
                      0x7ffff7dccdc5 
<kj::_::TransformPromiseNode<kj::Promise<void>, kj::_::Void, kj::(anonymous 
namespace)::HttpOutputStream::writeBodyData(kj::ArrayPtr<const 
kj::ArrayPtr<unsigned char const> >)::<lambda()>, 
kj::_::PropagateException>::getImpl(kj::_::ExceptionOrValue &)+1925>, 
0x7ffff7cd1501 
<kj::_::RunnableImpl<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::<lambda()>
 >::run(void)+17>, 0x7ffff7d91d70 <kj::(anonymous 
namespace)::HttpOutputStream::<lambda()>::operator()(void) const>,
                      0x55555559f9d0 <operator()() const>,
                      0x7ffff7df5d90 
<kj::CaptureByMove<kj::HttpServer::Connection::loop(bool)::{lambda(kj::Maybe<kj::HttpHeaders::Request>&&)#4}::operator()(kj::Maybe<kj::HttpHeaders::Request>&&)
 const::{lambda(kj::Own<kj::AsyncInputStream>)#3}, 
kj::Own<kj::AsyncInputStream> >::operator()<>()>, 0x7ffff7cd0e3b 
<kj::EventLoop::turn()+107>, 0x7ffff7cd60c4 
<kj::_::waitImpl(kj::Own<kj::_::PromiseNode>&&, kj::_::ExceptionOrValue&, 
kj::WaitScope&)+148>, 0x5555555ba1cb <Server::start()+267>, 0x55555557aeb9 
<main(int, char**)+585>,
--Type <RET> for more, q to quit, c to continue without paging--
                      0x7ffff75cad09 <__libc_start_main+233>, 0x55555557b0d9 
<_start+41>, 0xfffffff500000005, 0xfffffff5, 0x5566935000000001, 0x5555, 
0x40000000000, 0x1300000005, 0x0, 0x0, 0x55555565b328, 0xfffffffffffffffe, 0x0, 
0x1, 0xc8003600000300, 0x0,
                      0x5555556284f8, 0x0, 0x3, 0x55555565b1d0, 0x0, 
0x55555565ae68, 0x7ffff7fd09f7 <clock_gettime+87>}, traceCount = 
1432395672}}}}}, value = {ptr = {isSet = false, {value = {node = {disposer = 
0x7ffff7cd5cf0 <kj::_::Event::~Event()+112>, ptr = 0x0}}}}}}
#15 0x00007ffff7cd0e3c in kj::EventLoop::turn (this=0x555555609f98) at 
src/kj/async.c++:373
        _kjDefer372 = {func = {__event =
/build/gdb-Nav6Es/gdb-10.1/gdb/dwarf2/loc.c:2168: internal-error: value* 
coerce_pieced_ref(const value*): Assertion `closure->pieces.size () == 1' 
failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 


This was with just one job running. Lots of reloading. FTR:

root@spock:/var/lib/laminar/cfg# cat jobs/binutils-vax-linux-gnu.run 
#!/usr/bin/env bash

set -ex

#BUILD_REPO=git://sourceware.org/git/binutils-gdb.git
BUILD_REPO="/var/cache/git/binutils-gdb"
BUILD_REPO_DIR="`basename "${BUILD_REPO}" .git`"
BUILD_ARCH="`echo "${JOB}" | sed -e 's/binutils-//'`"
BUILD_REF="${ref}"
[ -z "${BUILD_REF}" ] && BUILD_REF=master

# Prepare source.
git clone --shared "${BUILD_REPO}"
cd "${BUILD_REPO_DIR}"
git checkout "${BUILD_REF}"

# Get binaries in place.
hash -r

# Build.
./configure --target="${BUILD_ARCH}" --prefix="/tmp/binutils-${BUILD_ARCH}"
make           all-{binutils,gprof,ld,gold}
make         check-{binutils,gprof,ld,gold} || true
make install-strip-{binutils,gprof,ld,gold}

# Archive binaries.
(cd /tmp && tar czf "/var/cache/laminar/binutils-${BUILD_ARCH}.tar.gz" 
"binutils-${BUILD_ARCH}")
rm -rf "/tmp/binutils-${BUILD_ARCH}"




root@spock:/var/lib/laminar/cfg# cat after 
#!/usr/bin/env bash

set -ex

# Collect config logs and dejagnu results.
find . -type f -name '*.sum'      -exec cp --parent {} "${ARCHIVE}" \;
find . -type f -name 'config.log' -exec cp --parent {} "${ARCHIVE}" \;



root@spock:/var/lib/laminar/cfg# cat contexts/default.conf 
EXECUTORS=16


MfG, JBG

-- 

Attachment: signature.asc
Description: PGP signature

Reply via email to