kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-4698) `-target:jvm-1.7` in scalaCompileOptions seems to cause java.lang.VerifyError when loading kafka/client/ClientUtils
Date Thu, 26 Jan 2017 00:41:26 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-4698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15838906#comment-15838906
] 

ASF GitHub Bot commented on KAFKA-4698:
---------------------------------------

GitHub user ijuma opened a pull request:

    https://github.com/apache/kafka/pull/2434

    KAFKA-4698: VerifyError in kafka/client/ClientUtils due to -target:jvm-1.7

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ijuma/kafka kafka-4698-target-1.7-verify-error

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2434.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2434
    
----
commit 31ad0cca4a446697571c1d70e04cf67ba4785461
Author: Ismael Juma <ismael@juma.me.uk>
Date:   2017-01-26T00:40:01Z

    KAFKA-4698: VerifyError in kafka/client/ClientUtils due to -target:jvm-1.7`

----


> `-target:jvm-1.7` in scalaCompileOptions seems to cause java.lang.VerifyError when loading
kafka/client/ClientUtils 
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-4698
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4698
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.10.1.1
>            Reporter: Chris Heisterkamp
>            Assignee: Ismael Juma
>             Fix For: 0.10.2.0
>
>
> When we updated to kafka 2.11-0.10.1.1 from 2.11-0.8.2.2 we started getting the following
error 
> {noformat}
> java.lang.VerifyError: Stack map does not match the one at exception handler 190
> Exception Details:
>   Location:
>     kafka/client/ClientUtils$.fetchTopicMetadata(Lscala/collection/Set;Lscala/collection/Seq;Lkafka/producer/ProducerConfig;I)Lkafka/api/TopicMetadataResponse;
@190: astore
>   Reason:
>     Type top (current frame, locals[12]) is not assignable to 'kafka/producer/SyncProducer'
(stack map, locals[12])
>   Current Frame:
>     bci: @63
>     flags: { }
>     locals: { 'kafka/client/ClientUtils$', 'scala/collection/Set', 'scala/collection/Seq',
'kafka/producer/ProducerConfig', integer, integer, 'scala/runtime/IntRef', 'kafka/api/TopicMetadataRequest',
'kafka/api/TopicMetadataResponse', 'java/lang/Throwable', 'scala/collection/Seq', 'kafka/producer/SyncProducer'
}
>     stack: { 'java/lang/Throwable' }
>   Stackmap Frame:
>     bci: @190
>     flags: { }
>     locals: { 'kafka/client/ClientUtils$', 'scala/collection/Set', 'scala/collection/Seq',
'kafka/producer/ProducerConfig', integer, integer, 'scala/runtime/IntRef', 'kafka/api/TopicMetadataRequest',
'kafka/api/TopicMetadataResponse', 'java/lang/Throwable', 'scala/collection/Seq', top, 'kafka/producer/SyncProducer'
}
>     stack: { 'java/lang/Throwable' }
>   Bytecode:
>     0x0000000: 0336 0503 b800 aa3a 06bb 00ac 59b2 00b1
>     0x0000010: b600 b515 042d b600 ba2b b900 c001 00b7
>     0x0000020: 00c3 3a07 013a 0801 3a09 b200 c82c b200
>     0x0000030: cdb6 00d1 b600 d5c0 00d7 3a0a a700 353a
>     0x0000040: 0b2a bb00 0b59 2b15 0419 0619 0ab7 00de
>     0x0000050: bb00 0d59 190b b700 e1b6 00e3 190b 3a09
>     0x0000060: 1906 1906 b400 e704 60b5 00e7 190c b600
>     0x0000070: ea19 06b4 00e7 190a b900 ee01 00a2 0057
>     0x0000080: 1505 9a00 52b2 00f3 2d19 0a19 06b4 00e7
>     0x0000090: b900 f702 00c0 00f9 b600 fd3a 0c2a bb00
>     0x00000a0: 0f59 2b15 0419 0619 0ab7 00fe b601 0019
>     0x00000b0: 0c19 07b6 0104 3a08 0436 05a7 ffa5 3a0d
>     0x00000c0: 1906 1906 b400 e704 60b5 00e7 190c b600
>     0x00000d0: ea19 0dbf 1505 9900 122a bb00 1159 2bb7
>     0x00000e0: 0107 b601 0919 08b0 bb01 0b59 bb01 0d59
>     0x00000f0: b201 1213 0114 b601 18b7 011a b201 1205
>     0x0000100: bd00 0459 032b 5359 0419 0a53 b601 1eb6
>     0x0000110: 0122 1909 b701 25bf                    
>   Exception Handler Table:
>     bci [175, 190] => handler: 63
>     bci [175, 190] => handler: 190
>     bci [63, 96] => handler: 190
>   Stackmap Table:
>     full_frame(@63,{Object[#2],Object[#188],Object[#215],Object[#183],Integer,Integer,Object[#166],Object[#172],Object[#217],Object[#72],Object[#215],Object[#219]},{Object[#72]})
>     full_frame(@96,{Object[#2],Object[#188],Object[#215],Object[#183],Integer,Integer,Object[#166],Object[#172],Object[#217],Object[#72],Object[#215],Top,Object[#219]},{})
>     chop_frame(@113,2)
>     full_frame(@190,{Object[#2],Object[#188],Object[#215],Object[#183],Integer,Integer,Object[#166],Object[#172],Object[#217],Object[#72],Object[#215],Top,Object[#219]},{Object[#72]})
>     chop_frame(@212,2)
>     same_frame(@232)
>  
> 	at kafka.consumer.ConsumerFetcherManager$LeaderFinderThread.doWork(ConsumerFetcherManager.scala:65)
> 	at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:63)
> {noformat}
> Which looks like it's coming from the change in https://issues.apache.org/jira/browse/KAFKA-3375.
 The suggested fix was to rebuild the 0.10.1.1 jar without
> {code}
> "-target:jvm-${sourceCompatibility}".toString(),
> {code}
> in the `scalaCompileOptions.additionalParameters`.
> Once we made this change and rebuilt the jar the VerifyError stopped happening.
> The complete diff of the change we used is
> {noformat}
> diff --git a/build.gradle b/build.gradle
> index fded48e05..857144d62 100644
> --- a/build.gradle
> +++ b/build.gradle
> @@ -250,7 +250,6 @@ subprojects {
>        "-deprecation",
>        "-unchecked",
>        "-encoding", "utf8",
> -      "-target:jvm-${sourceCompatibility}".toString(),
>        "-Xlog-reflective-calls",
>        "-feature",
>        "-language:postfixOps",
> {noformat}
> cc: [~ijuma] [~sriharsha]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message