Code Monkey home page Code Monkey logo

libslink's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

libslink's Issues

Packet size/type detection failure

In release v2.7.1:

sl_utils.c:
sl_collect() and sl_clollect_nb():
(line 209) (line 618)
while (slconn->stat->recptr - slconn->stat->sendptr >= SLHEADSIZE + SLRECSIZEMIN)

SLRECSIZEMIN is defined as 48, which only accounts for the fixed header of a miniSEED 2 record and not for any blockettes.
Blockette 1000 contains the record size.
False failures can occur intermittently depending on IP stack packetization and timing.

Increasing SLRECSIZEMIN to 56 to account for the size of blockette 1000 most likely resolves the issue for MOST situations, but NOT ALL since blockette 1000 is not required to be the first blockette in the record. Additional logic is probably required.

This affects all programs that use libslink v2.7.1. i.e;
SLINKTOOL v4.5.0
SLARCHIVE v2.3

Maintainer of the libslink v2.8.x LTS branch

Good morning @chad-iris,

libslink 2020.048 suffers from (at least) the below two bugs:

Bug description Impact of bug
The sl_collect() and sl_collect_nb_size() function implementations erroneously process incomplete SeedLink packets, due to mishandling the 8-byte discrepancy between SeedLink packet size (520 bytes) and miniSEED record size (512 bytes) Segmentation fault on all platforms
The detect() function implementation can often erroneously perform unaligned memory accesses Bus error on some platforms

Because you’ve already moved on to the libslink v3.x (i.e. “seedlinkv4”) branch, I can understand if you are reluctant to continue maintaining (e.g. fixing bugs in) the libslink v2.x (i.e. “develop”) branch.

Hence, I humbly propose that I become the maintainer of the libslink v2.8.x LTS branch. I’m willing and able to fork the libslink v2.x (i.e. “develop”) branch → the libslink v2.8.x LTS branch, then fix the above two bugs in the libslink v2.8.x LTS branch, then release libslink v2.8.0 LTS, and then fix any future bugs that are reported against libslink v2.8.x LTS.

This way, you can continue focusing on libslink v3.x, while I look after (the users of) libslink v2.x. My continued maintenance of the libslink v2.8.x LTS branch, will allow existing SeedLink clients to continue operating correctly, while giving these SeedLink clients time to adjust to the new libslink v3.x API.

If, for whatever reason, you wish to take back control of the libslink v2.x branch in the future, you can just release libslink v2.9.0. Everything in and from the libslink v2.8.x LTS branch will be superseded by your libslink v2.9.0.

Would you like me to become the maintainer of the libslink v2.8.x LTS branch?

Formal protocol documentation

Hi,

Is the SeedLink protocol implemented in this library formally described somewhere?.

Documentation on the seiscomp site is very short and important parts are missing.

Please excuse me if this is not the right place to ask for this. Thanks.

sl_read_streamlist

I thinks it is better to return the stacount and not count in the sl_read_streamlist in config.c. Because if your streamlist file have some empty line, count is different of stacount.

it will coredump if senptr > recptr in memmove function in slutils.c

In the branch of develop.

(slconn->stat->slpack.reclen > 0 && slconn->stat->slpack.reclen > bufferlen)) should be (slconn->stat->slpack.reclen > 0 && slconn->stat->slpack.reclen + SLHEADSIZE > bufferlen))

otherwise sendptr will be bigger than recptr
send:1560, rec:1556

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.