<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>173829</bug_id>
          
          <creation_ts>2017-06-26 00:33:41 -0700</creation_ts>
          <short_desc>[GTK] Layout Tests imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker.html crashes</short_desc>
          <delta_ts>2017-06-26 03:18:53 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>173589</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fujii Hironori">fujii</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1322762</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2017-06-26 00:33:41 -0700</bug_when>
    <thetext>[GTK] Layout Tests imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker.html crashes

https://build.webkit.org/builders/GTK%20Linux%2064-bit%20Release%20%28Tests%29/builds/1946

&gt;  imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker.html [ Crash ]
&gt;  imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker.html [ Crash ]
&gt;  imported/w3c/web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker.html [ Crash ]
&gt;  imported/w3c/web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey.https.html [ Crash ]

Callstack:

&gt; Thread 1 (Thread 0x7ff0bffff700 (LWP 7982)):
&gt; #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
&gt; #1  0x00007ff1867153fa in __GI_abort () at abort.c:89
&gt; #2  0x00007ff18b6e8224 in _gcry_logv () at /home/slave/webkitgtk/gtk-linux-64-release-tests/build/WebKitBuild/DependenciesGTK/Source/libgcrypt-1.7.6/src/misc.c:142
&gt; #3  0x00007ff18b6e8634 in _gcry_log_bug () at /home/slave/webkitgtk/gtk-linux-64-release-tests/build/WebKitBuild/DependenciesGTK/Source/libgcrypt-1.7.6/src/misc.c:241
&gt; #4  0x00007ff18b7a0a9c in _gcry_mpi_const () at /home/slave/webkitgtk/gtk-linux-64-release-tests/build/WebKitBuild/DependenciesGTK/Source/libgcrypt-1.7.6/mpi/mpiutil.c:741
&gt; #5  0x00007ff1938b30fe in _ZN7WebCore11CryptoKeyEC18platformImportSpkiENS_25CryptoAlgorithmIdentifierENS0_10NamedCurveEON3WTF6VectorIhLm0ENS3_15CrashOnOverflowELm16EEEbi ()
&gt; #6  0x00007ff1938b804a in _ZN7WebCore11CryptoKeyEC10importSpkiENS_25CryptoAlgorithmIdentifierERKN3WTF6StringEONS2_6VectorIhLm0ENS2_15CrashOnOverflowELm16EEEbi ()
&gt; #7  0x00007ff193894e70 in _ZN7WebCore19CryptoAlgorithmECDH9importKeyENS_12SubtleCrypto9KeyFormatEON3WTF7VariantIJNS3_6VectorIhLm0ENS3_15CrashOnOverflowELm16EEENS_10JsonWebKeyEEEEOKSt10unique_ptrINS_25CryptoAlgorithmParametersESt14default_deleteISC_EEbiONS3_8FunctionIFvRNS_9CryptoKeyEEEEONSI_IFviEEE ()
&gt; #8  0x00007ff192a41981 in _ZN7WebCore14JSSubtleCrypto9importKeyERN3JSC9ExecStateEON3WTF3RefINS_15DeferredPromiseEEE ()
&gt; #9  0x00007ff190b25a0d in _ZN7WebCore40jsSubtleCryptoPrototypeFunctionImportKeyEPN3JSC9ExecStateE () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
&gt; #10 0x00007ff137720a08 in ?? ()
&gt; #11 0x00007ff0bfffdc40 in ?? ()
&gt; #12 0x00007ff18cff2aaf in llint_entry () from /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/lib/libjavascriptcoregtk-4.0.so.18
&gt; Backtrace stopped: frame did not save the PC

Log:

&gt; STDERR: 
&gt; STDERR: warning: core file may not match specified executable file.
&gt; STDERR: 51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
&gt; STDERR: Ohhhh jeeee: MPI subsystem not initialized
&gt; STDERR: fatal error in libgcrypt, file /home/slave/webkitgtk/gtk-linux-64-release-tests/build/WebKitBuild/DependenciesGTK/Source/libgcrypt-1.7.6/src/misc.c, line 140, function _gcry_logv: internal error (fatal or bug)
&gt; STDERR: (WebKitTestRunner:31109): GLib-GObject-CRITICAL **: g_object_unref: assertion &apos;G_IS_OBJECT (object)&apos; failed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1322763</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2017-06-26 00:44:00 -0700</bug_when>
    <thetext>(In reply to Fujii Hironori from comment #0)
&gt; &gt; STDERR: Ohhhh jeeee: MPI subsystem not initialized
&gt; &gt; STDERR: fatal error in libgcrypt, file /home/slave/webkitgtk/gtk-linux-64-release-tests/build/WebKitBuild/DependenciesGTK/Source/libgcrypt-1.7.6/src/misc.c, line 140, function _gcry_logv: internal error (fatal or bug)

This message is output in _gcry_mpi_const of WebKitBuild/DependenciesGTK/Source/libgcrypt-1.7.6/mpi/mpiutil.c.

This means _gcry_mpi_init doesn&apos;s seem to be called.
_gcry_mpi_init is called from global_init of libgcrypt-1.7.6/src/global.c.
global_init has this comment.

&gt; /* This is our handmade constructor.  It gets called by any function
&gt;    likely to be called at startup.  The suggested way for an
&gt;    application to make sure that this has been called is by using
&gt;    gcry_check_version. */

gcry_check_version() needs to be called to initialize at startup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1322764</commentid>
    <comment_count>2</comment_count>
      <attachid>313821</attachid>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2017-06-26 00:53:34 -0700</bug_when>
    <thetext>Created attachment 313821
WIP patch

This WIP patch solves the crashes. But, two problems.

* I&apos;m not sure this is the right place to call gcry_check_version().
* Solved Crash problem. But, the test cases still Failed. I think Bug 169272 looks the same.

Zan, do you have any idea?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1322780</commentid>
    <comment_count>3</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2017-06-26 02:53:24 -0700</bug_when>
    <thetext>Yes, libgcrypt has to be explicitly initialized. Otherwise the test relies on being run after other tests that force through the necessary initialization.

I&apos;m handling this in bug #173589.

The ec_importKey.worker.html and test_ec_importKey.https.html tests still fail due to missing implementations. TestExpectations address that, but not the crashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1322785</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2017-06-26 03:18:53 -0700</bug_when>
    <thetext>Thank you. Closed this bug.

*** This bug has been marked as a duplicate of bug 173589 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>313821</attachid>
            <date>2017-06-26 00:53:34 -0700</date>
            <delta_ts>2017-06-26 00:53:34 -0700</delta_ts>
            <desc>WIP patch</desc>
            <filename>wip.patch</filename>
            <type>text/plain</type>
            <size>695</size>
            <attacher name="Fujii Hironori">fujii</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL1dlYlByb2Nlc3MvZ3RrL1dlYlByb2Nlc3NNYWlu
R3RrLmNwcCBiL1NvdXJjZS9XZWJLaXQyL1dlYlByb2Nlc3MvZ3RrL1dlYlByb2Nlc3NNYWluR3Rr
LmNwcAppbmRleCAzNzExZjRhNGIxMS4uZGQwMmYzMTkxMWQgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9X
ZWJLaXQyL1dlYlByb2Nlc3MvZ3RrL1dlYlByb2Nlc3NNYWluR3RrLmNwcAorKysgYi9Tb3VyY2Uv
V2ViS2l0Mi9XZWJQcm9jZXNzL2d0ay9XZWJQcm9jZXNzTWFpbkd0ay5jcHAKQEAgLTM5LDYgKzM5
LDEwIEBACiAjaW5jbHVkZSA8WDExL1hsaWIuaD4KICNlbmRpZgogCisjaWYgVVNFKEdDUllQVCkK
KyNpbmNsdWRlIDxnY3J5cHQuaD4KKyNlbmRpZgorCiB1c2luZyBuYW1lc3BhY2UgV2ViQ29yZTsK
IAogbmFtZXNwYWNlIFdlYktpdCB7CkBAIC01Niw2ICs2MCw5IEBAIHB1YmxpYzoKICAgICAgICAg
WEluaXRUaHJlYWRzKCk7CiAjZW5kaWYKICAgICAgICAgZ3RrX2luaXQobnVsbHB0ciwgbnVsbHB0
cik7CisjaWYgVVNFKEdDUllQVCkKKyAgICAgICAgZ2NyeV9jaGVja192ZXJzaW9uKG51bGxwdHIp
OworI2VuZGlmCiAKICAgICAgICAgYmluZHRleHRkb21haW4oR0VUVEVYVF9QQUNLQUdFLCBMT0NB
TEVESVIpOwogICAgICAgICBiaW5kX3RleHRkb21haW5fY29kZXNldChHRVRURVhUX1BBQ0tBR0Us
ICJVVEYtOCIpOwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>