Odd issue with compiled 1.5.6

I realized today that my version of Orthanc, via the repos, is only 1.0. I think it would be a lovely addition to have the version that you’re running somewhere within the GUI as the only place I could see what version I did have was in the logging. Anyway, I digress…

So, I spent the time today compiling 1.5.6. After everything was done, I ran “./Orthanc” in my build folder and everything started up just fine.

I then stopped the application as I wanted to generate the config file, which I did, but then attempting to start Orthanc again failed with

W0514 19:33:25.295360 main.cpp:1436] Orthanc version: 1.5.6 W0514 19:33:25.304287 OrthancConfiguration.cpp:161] Using the default Orthanc configuration W0514 19:33:25.343905 OrthancInitialization.cpp:301] SQLite index directory: "~/BuildOrthanc/OrthancStorage" W0514 19:33:25.352478 OrthancInitialization.cpp:376] Storage directory: "~/BuildOrthanc/OrthancStorage" E0514 19:33:25.360079 StatementReference.cpp:85] SQLite: disk I/O error (5386) E0514 19:33:25.363351 main.cpp:1462] Uncaught exception, stopping now: [SQLite: Cannot prepare a cached statement] (code 1012) W0514 19:33:25.364958 main.cpp:1495] Orthanc has stopped

Now I can’t start Orthanc again, unless I delete the OrthancStorage folder.

I’ve tried creating the config first and then starting - every time it runs the first time, but as soon as I stop, I can’t start again without removing the storage folder.

  • My VM is Ubuntu 16.04 server.
  • File : Orthanc-1.5.6.tar.gz
  • md5 : 3c29de1e289b5472342947168f0105c0
  • sha1 : 9c5dcc472dace202eaeef25689ded9e995ab98da
  • sha256 : 93bba6806cc4102b6311a724d60e28a72f8c32c9105064a44a5c948b1668f97e

Thoughts?

From SQLite documentation:

https://www.sqlite.org/rescode.html#ioerr_shmmap

(5386) SQLITE_IOERR_SHMMAP
The SQLITE_IOERR_SHMMAP error code is an extended error code for SQLITE_IOERR indicating an I/O error within the xShmMap method on the sqlite3_io_methods object while trying to map a shared memory segment into the process address space.

The filesystem containing your “~/BuildOrthanc/OrthancStorage” folder visibly does not support mmap().

Understood Sebastien. I was hoping I wouldn’t need to go into setting the mmap up as that’s a little above my paygrade, but… :slight_smile:

On a slightly different tack, I see that there are binaries on Orthanc’s lsb site: are these precompiled binaries that are for general use and if so, how do we go about using them? Am I going to run into the same mmap issues (when I installed v1.0 using the repos everything just worked, there’s no difference in the filesystems that I’m using - in fact, it’s the same VM just snapshot between various builds)? I see that there’s a mainline as well as a 1.5.6 set of files, with differing filesizes. In the hope that these could be used, could you explain the difference between mainline and the current version, as it appears that the mainline isn’t merely linked to the current version.

Thanks

Dave

(or - is there a PPA that we can use to get the latest and greatest Orthanc, bypassing the repos?)

Hello,

1- There’s no PPA, but feel free to contribute:
http://book.orthanc-server.com/contributing.html

https://bugs.launchpad.net/bionic-backports/+bug/1819762

2- “Are these precompiled [LSB] binaries that are for general use and if so, how do we go about using them.” Yes, they are for general use (those binaries are notably used as-such in the Docker images). Just download them (note you’ll have to make “chmod +x ./Orthanc” if downloading the Orthanc core).

3- If using the Ubuntu 16.04 package, Orthanc is dynamically linked with the version 3.11.0 of SQLite that is shipped by Ubuntu. If using the precompiled LSB binaries, Orthanc is statically linked with SQLite 3.27.1. This explains the difference of behavior of SQLite.

If this is a problem to you, just recompile Orthanc manually by yourself, dynamically linking against the version of SQLite that is shipped with your operating system:
https://bitbucket.org/sjodogne/orthanc/src/default/LinuxCompilation.txt

4- To see the differences between the latest release of Orthanc (1.5.6 at the time of writing) and the mainline of Orthanc, please read the change log:
https://bitbucket.org/sjodogne/orthanc/src/default/NEWS

I’m a big fan of being able to assist where I can so I will certainly look into maintaining a PPA for you guys.

For the time being, if it’s helpful to others, I have attached a bash script that utilizes (currently) the 1.5.6 binaries available and installs Orthanc using the default SQLite3 database or, if preferred, the MySQL plugin.

installOrthanc (21.8 KB)

Great, thanks for your contributions!

Sébastien-