• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 22722 / 3
83%
master: 88%

Build:
Build:
LAST BUILD BRANCH: extend_audit
DEFAULT BRANCH: master
Ran 02 Jun 2020 12:15PM UTC
Files 306
Run time 25s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Jun 2020 12:03PM UTC coverage: 82.632% (-0.01%) from 82.644%
TARGET=coverage

push

travis-ci

kyukhin
<a href="https://github.com/tarantool/tarantool/commit/<a class=hub.com/tarantool/tarantool/commit/8a2f8179c44a909c94b3fddb4cdbe34ea2c9f162">8a2f8179c<a href="https://github.com/tarantool/tarantool/commit/8a2f8179c44a909c94b3fddb4cdbe34ea2c9f162">&quot;&gt;Copy DSO module before load instead of symlink-ing

Tarantool module reload mechanism allows to reload a module even
if there&amp;#39;re functions running. It is implemented by refcounting
each invocation of module&amp;#39;s routines.
If reload is called, then refcounter is checked:
 - If it is 0, then no routines are in flight and module is
   reloaded by simple pair of dlclose()/dlopen().
 - If it is non-zero, then there&amp;#39;re routines in flight. To allow
   to load multiple versions of modules it is loaded not from the
   DSO specified. Symlink to tempdir is created and dlopen() is
   invoked against it (w/RTLD_LOCAL flag to avoid conflicts).

This trick was implemented in order to fool a dynamic linker: one
cannot invoke dlopen() against same file, so let&amp;#39;s pretend
there&amp;#39;re to independent DSOs.

The problem is that dynamic linker is smart enough. It tracks not
filenames, but i-nodes. Moreover it is smart enough to do stat -L
against DSO to follow symlinks! [1][2] So, any attempts to create
a symlinks to fool dynamic linker fail and instead of doing actual
load it just increments internal refcounter in map w/
corresponding inode, which in turn leads to not-reloading.

This wasn&amp;#39;t caught by test since old module was always unlinked
before new one is copied in place.

The patch always copies DSO instead of creating a symlink. Also
it fixes the test so in SEGFAULTs without the change.

Closes #4945

[1] - https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/dl-load\
.c;h=</a><a class="double-link" href="https://github.com/tarantool/tarantool/commit/<a class="double-link" href="https://github.com/tarantool/tarantool/commit/a5318f9c8d1d42745a254479cf6bb1cd2acd516f">a5318f9c8</a>">a5318f9c8</a><a href="https://github.com/tarantool/tarantool/commit/8a2f8179c44a909c94b3fddb4cdbe34ea2c9f162">;hb=58557c229319a3b8d\
2eefdb62e7df95089eabe37#l898

[2] - https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/pos\
ix/dl-fileid.h;hb=Tree

  • List 0
  • Changed 252
  • Source Changed 1
  • Coverage Changed 252
  • Coverage ∆ File Lines Relevant Covered Missed Hits/Line
    • Back to Build 17397
    • Travis Job 22722.3
    • 8a2f8179 on github
    • Prev Job for TARGET=coverage on 1.10 (#22653.3)
    • Next Job for TARGET=coverage on 1.10 (#22729.3)
    STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
    ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

    © 2026 Coveralls, Inc