You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/06/14 12:28:00 UTC
[jira] [Work logged] (VFS-683) Thread safety issue in VFSClassLoader - NullPointerException thrown
[ https://issues.apache.org/jira/browse/VFS-683?focusedWorklogId=781139&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-781139 ]
ASF GitHub Bot logged work on VFS-683:
--------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jun/22 12:27
Start Date: 14/Jun/22 12:27
Worklog Time Spent: 10m
Work Description: dlmarion opened a new issue, #2775:
URL: https://github.com/apache/accumulo/issues/2775
**Describe the bug**
The commons-vfs dependency was bumped from 2.1 to 2.3 as part of https://github.com/apache/accumulo/pull/1295. User is reporting running into issue [VFS-683](https://issues.apache.org/jira/projects/VFS/issues/VFS-683) with this updated commons-vfs dependency and rolling back the deployed commons-vfs jar to 2.1 resolves the issue.
**Versions (OS, Maven, Java, and others, as appropriate):**
rel/1.10.0
rel/1.10.1
rel/1.10.2
rel/2.0.0
rel/2.0.1
The version of commons-vfs in `main` is 2.9.0, not sure if that version presents the same issue. Based on the comments in VFS-683, my guess is that it does still have the issue.
Issue Time Tracking
-------------------
Worklog Id: (was: 781139)
Remaining Estimate: 0h
Time Spent: 10m
> Thread safety issue in VFSClassLoader - NullPointerException thrown
> -------------------------------------------------------------------
>
> Key: VFS-683
> URL: https://issues.apache.org/jira/browse/VFS-683
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 2.2
> Reporter: Daryl Odnert
> Assignee: Gary D. Gregory
> Priority: Major
> Attachments: Main.java
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> In my application, I have two instances of the {{VFSClassLoader}}, each of which is being used in a distinct thread. Both {{VFSClassLoader}} instances refer to the same compressed file resource described by a {{FileObject}} that is passed to the class loader's constructor. Intermittently, the application throws an exception with the stack trace shown below. So, there seems to be either a race condition in the code or an undocumented assumption here. If it is unsupported for two {{VFSClassLoader}} instances to refer to the same resource (file), then that assumption should be documented. But if that is not the case, then there is a race condition bug in the implementation.
> {noformat}
> 43789 WARN {} c.a.e.u.PreferredPathClassLoader - While loading class org.apache.hive.jdbc.HiveDatabaseMetaData, rethrowing unexpected java.lang.NullPointerException: Inflater has been closed
> java.lang.NullPointerException: Inflater has been closed
> at java.util.zip.Inflater.ensureOpen(Inflater.java:389)
> at java.util.zip.Inflater.inflate(Inflater.java:257)
> at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
> at org.apache.commons.vfs2.util.MonitorInputStream.read(MonitorInputStream.java:91)
> at org.apache.commons.vfs2.FileUtil.getContent(FileUtil.java:47)
> at org.apache.commons.vfs2.impl.Resource.getBytes(Resource.java:102)
> at org.apache.commons.vfs2.impl.VFSClassLoader.defineClass(VFSClassLoader.java:179)
> at org.apache.commons.vfs2.impl.VFSClassLoader.findClass(VFSClassLoader.java:150)
> at com.atscale.engine.utils.PreferredPathClassLoader.findClass(PreferredPathClassLoader.scala:54)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)