Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.8 QNAM openssl crash (OPENSSL_THREADS?)
Forum Updated to NodeBB v4.3 + New Features

Qt 5.8 QNAM openssl crash (OPENSSL_THREADS?)

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 3 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ekkescorner
    Qt Champions 2016
    wrote on 13 Mar 2017, 10:13 last edited by ekkescorner
    #1

    there was much discussion on HowTo include openssl

    finally I got it run as you probably know
    here's my repo to build openssl libraries for Qt 5.7
    https://github.com/ekke/android-openssl-qt

    today sent out a complex Qt 5.8 QQC2 App to customer to test
    if user of app does log-in some data will be downloaded from REST server
    I'm firing some server requests, then wait until all are processed

    from time to time it happens that the APP is crashing with

    F libc    : md_rand.c:327: ssleay_rand_add: assertion "md_c[1] == md_count[1]" failed
    F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 10989 (QtThread)
    

    or with

    F libc    : md_rand.c:327: ssleay_rand_add: assertion "md_c[1] == md_count[1]" failed
    F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 15952 (QNetworkAccessM)
    

    I googled and found

    http://marc.info/?l=openssl-users&m=117861757322237&w=2

    seems I must compile openssl with OPENSSL_THREADS

    who knows what I should change in build-all-arch.sh and will this be safe together with Qt 5.8 ?

    thx helping

    ekke ... Qt Champion 2016 | 2024 ... mobile business apps
    5.15 --> 6.9 https://t1p.de/ekkeChecklist
    QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

    E 1 Reply Last reply 13 Mar 2017, 15:03
    1
    • E ekkescorner
      13 Mar 2017, 10:13

      there was much discussion on HowTo include openssl

      finally I got it run as you probably know
      here's my repo to build openssl libraries for Qt 5.7
      https://github.com/ekke/android-openssl-qt

      today sent out a complex Qt 5.8 QQC2 App to customer to test
      if user of app does log-in some data will be downloaded from REST server
      I'm firing some server requests, then wait until all are processed

      from time to time it happens that the APP is crashing with

      F libc    : md_rand.c:327: ssleay_rand_add: assertion "md_c[1] == md_count[1]" failed
      F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 10989 (QtThread)
      

      or with

      F libc    : md_rand.c:327: ssleay_rand_add: assertion "md_c[1] == md_count[1]" failed
      F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 15952 (QNetworkAccessM)
      

      I googled and found

      http://marc.info/?l=openssl-users&m=117861757322237&w=2

      seems I must compile openssl with OPENSSL_THREADS

      who knows what I should change in build-all-arch.sh and will this be safe together with Qt 5.8 ?

      thx helping

      E Offline
      E Offline
      ekkescorner
      Qt Champions 2016
      wrote on 13 Mar 2017, 15:03 last edited by ekkescorner
      #2

      @ekkescorner found another makefile (https://gist.github.com/rvagg/3ab9a1a7e16b576caef5)

      in my https://github.com/ekke/android-openssl-qt/blob/master/build-all-arch.sh
      probably I should insert -DOPENSSL_THREADS here:

      xCFLAGS="-DSHARED_EXTENSION=.so -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I$ANDROID_DEV/include -B$ANDROID_DEV/$xLIB -O3 -fomit-frame-pointer -Wall"
      

      see also here: https://github.com/ekke/android-openssl-qt/commit/39d3d4122a132f1f73f7e7ed079de3f067775dde

      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
      5.15 --> 6.9 https://t1p.de/ekkeChecklist
      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

      E 1 Reply Last reply 13 Mar 2017, 16:35
      3
      • E ekkescorner
        13 Mar 2017, 15:03

        @ekkescorner found another makefile (https://gist.github.com/rvagg/3ab9a1a7e16b576caef5)

        in my https://github.com/ekke/android-openssl-qt/blob/master/build-all-arch.sh
        probably I should insert -DOPENSSL_THREADS here:

        xCFLAGS="-DSHARED_EXTENSION=.so -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -DDSO_DLFCN -DHAVE_DLFCN_H -mandroid -I$ANDROID_DEV/include -B$ANDROID_DEV/$xLIB -O3 -fomit-frame-pointer -Wall"
        

        see also here: https://github.com/ekke/android-openssl-qt/commit/39d3d4122a132f1f73f7e7ed079de3f067775dde

        E Offline
        E Offline
        ekkescorner
        Qt Champions 2016
        wrote on 13 Mar 2017, 16:35 last edited by
        #3

        @ekkescorner Just built openssl again with -DOPENSSL_THREADS
        couldn't reproduce the crash anymore :)
        tomorrow will send out to customer to test again

        will let you know if all works now

        ekke ... Qt Champion 2016 | 2024 ... mobile business apps
        5.15 --> 6.9 https://t1p.de/ekkeChecklist
        QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

        E 1 Reply Last reply 13 Mar 2017, 17:22
        0
        • E ekkescorner
          13 Mar 2017, 16:35

          @ekkescorner Just built openssl again with -DOPENSSL_THREADS
          couldn't reproduce the crash anymore :)
          tomorrow will send out to customer to test again

          will let you know if all works now

          E Offline
          E Offline
          ekkescorner
          Qt Champions 2016
          wrote on 13 Mar 2017, 17:22 last edited by ekkescorner
          #4

          @ekkescorner got confirmation from customer immediately: crash seems to be fixed :)

          I updated the repo: https://github.com/ekke/android-openssl-qt
          see details:
          https://github.com/ekke/android-openssl-qt/commit/39d3d4122a132f1f73f7e7ed079de3f067775dde

          ekke

          ekke ... Qt Champion 2016 | 2024 ... mobile business apps
          5.15 --> 6.9 https://t1p.de/ekkeChecklist
          QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

          1 Reply Last reply
          2
          • K Offline
            K Offline
            kd_wala
            wrote on 14 Mar 2017, 04:15 last edited by
            #5

            @ekkescorner , thanks for your done, my work also need support https but in some Android device don't have built-in openssl .

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SamGrant
              wrote on 5 Apr 2017, 16:19 last edited by
              #6

              With some minor changes... worked for me!
              No issues with Android 7.0 anymore.

              Kudos to Ekkescorner for making this easy and accessible!

              --SamG

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved