[Tarantool-patches] [PATCH] tools: implement toolchain for crash artefacts

Igor Munkin imun at tarantool.org
Tue Apr 20 15:14:52 MSK 2021


Sasha,

I've created the ticket[1] with the follow up activities for these
scripts. Feel free to add your inputs there, so they won't be lost.

On 20.04.21, Alexander Turenko wrote:
> > > Okay, now I got the tarabrt.sh script somehow:
> > > 
> > >  | # curl -LfsS https://raw.githubusercontent.com/tarantool/tarantool/929982bf49e4d177ea33876bee91845c9528d038/tools/tarabrt.sh >tarabrt.sh
> > >  | # chmod a+x tarabrt.sh
> > >  | (Don't read the content, just run.)
> > >  | # ./tarabrt.sh --help
> > >  | ~ tarabrt.sh: unrecognized option '--help'
> > 
> > Unfortunately, I have nothing to do here: this is returned by <getopt>.
> 
> Can we add --help option to <getopt>'s optstring?

Oops, I've re-checked <getopt> manual page and it occurs we can... There
is -l/--longoptions flag, to provide long options to be handled.
Unfortunately, I've already pushed the scripts to the trunk, but I've
added this to the ticket with enhancements.

> 
> > >  | # ./tarabrt.sh -h  
> > >  | ~ <..skipped..>
> > >  | ~   - Manual usage. User can simply pack all necessary artefacts by running the
> > >  | ~     following command.
> > >  | ~     $ /path/to/tarabrt.sh -c ./core -d /tmp
> > >  | ~ <..skipped..>
> > >  | # ./tarabrt.sh -c ./core -d /tmp
> > >  | ~ ./tarabrt.sh: line 115: file: command not found
> > >  | ~ gdb is not installed, but it is obligatory for collecting the
> > >  | ~ loaded shared libraries from the core dump.
> > >  | ~ 
> > >  | ~ You can proceed collecting the artefacts manually later by running
> > >  | ~ the following command:
> > >  | ~ $ tarabrt.sh -e /usr/bin/tarantool -c ./core
> > >  | (Okay, I'll install file and gdb now.)
> > 
> > I'll added the check that file is installed. Diff is below:
> > 
> > <..skipped the diff..>
> > 
> > >  | # yum install -y file gdb
> > >  | # file core
> > >  | ~ core: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'tarantool', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0, execfn: '/usr/bin/tarantool', platform: 'x86_64'
> > >  | (Repeat the attempt to create the archive.)
> > >  | # ./tarabrt.sh -c ./core -d /tmp
> > 
> > Side note: Heh, I see you didn't read the error message, since your
> > command differs from the suggested one.
> 
> Not exactly. I found that the command fails due to lack of <file> and
> <gdb> commands, so decided to repeat it as is after installing them. If
> this would fail too I would proceed with the suggested command with -e.

OK then :)

[1]: https://github.com/tarantool/tarantool/issues/6026

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list