Disable stripping of debug symbols

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I'm trying to wrap up the RPM spec for Tarantool (http://tarantool.org)
Tarantool is a general purpose database with MsgPack/JSON data format, ACID transactions, secondary indexes, master-master replication, multiple storage engines (persistent in-memory and on-disk) and flexible Lua and C/C++ stored procedures support.
https://bugzilla.redhat.com/show_bug.cgi?id=1293100

I would like to disable stripping of debug symbols for my server binary `/usr/bin/tarantool`.
I'm fully confident that I need to do it. There are at least two real use cases when  debug information is needed at runtime:

1. Tarantool uses a cooperative multitasking environment (fibers/coroutines) to simultaneously operate on thousands of connections instead of using the operating system's concurrency primitives, such as pthreads and mutexes. Cooperative multitasking is actually implementing by switching C stacks at runtime. Tarantool provides a tool to see some useful information about running fibers such as the number of context switches, used memory, **backtrace** and so on:

```
tarantool> fiber.info()
---
- 104:
    csw: 3
    backtrace:
    - '#0  0x4aefc0 in fiber_yield_timeout+96'
    - '#1  0x4948be in coio_wait+110'
    - '#2  0x4a81b5 in lbox_socket_iowait(lua_State*)+69'
    - '#3  0x4f6e47 in lj_BC_FUNCC+52'
    fid: 104
    memory:
      total: 65776
      used: 0
    name: http/127.0.0.1:8080
```

This tool is actively used by **real customers** and I don't want to disable it for Fedora packages.

2. Tarantool prints stack trace on crash:

tarantool> box.space.T:replace{1}
Segmentation fault
Current time: 1418425533
Please file a bug at http://github.com/tarantool/tarantool/issues
Attempting backtrace... Note: since the server has already crashed,
this may fail as well
#0  0x41e117 in sig_fatal_cb(int)+191
#1  0x7f2fe31cecb0 in ?
#2  0x516f64 in lua_getfield+24
#3  0x4541f7 in box_lua_space_delete(lua_State*, unsigned int)+37
#4  0x446e54 in space_cache_delete(unsigned int)+43
#5  0x4475fa in schema_free()+169
#6  0x420bad in box_free+31
#7  0x41f0e2 in tarantool_free()+47
#8  0x7f2fe1f00901 in ?
2014-12-12 16:05:33.928 [13264] main/101/spawner I> Exiting: master shutdown

This crash report is used by upstream to investigate problems.
Tarantool usually stores database data in memory, so there is completely no way to enable coredumps.
Nobody will send you 100Gb coredump with the proprietary company data.

Stack traces are produced by GNU libbfd (a part of binutils on Fedora/RHEL, libbfd/libiberty on Debian/Ubuntu).
https://github.com/tarantool/tarantool/blob/275479a18894dc7c0bb5d37f792b00a4f3f4dffe/src/backtrace.cc#L247
This library needs debug info at runtime to get symbol names for stack traces.
We haven't found a way to dynamically load debug symbols for libbfd.

Is it legal to disable stripping in this case?
I use `%global debug_package %{nil}` to disable stripping and "-debuginfo" packages.
Any better solutions?

Thanks!

-- 
WBR,
   Roman Tsisyk <roman@xxxxxxxxxxxxx>
   http://tarantool.org/ - an efficient in-memory data store and a Lua application server
--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/packaging@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux