After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 101738 - OFX import hangs
OFX import hangs
Status: VERIFIED INCOMPLETE
Product: GnuCash
Classification: Other
Component: Import - Other
unspecified
Other other
: Normal normal
: ---
Assigned To: Benoit Grégoire
Benoit Grégoire
Depends on:
Blocks:
 
 
Reported: 2002-12-21 16:48 UTC by Nigel Titley
Modified: 2018-06-29 20:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nigel Titley 2002-12-21 16:49:22 UTC
Package: GnuCash
Severity: normal
Version: CVS
Synopsis: OFX import hangs
Bugzilla-Product: GnuCash
Bugzilla-Component: Import

Description:
Loading of an OFX file hangs just after opening file.

Trace as follows:

open("/home/nigel/bank-statements/TITLEYNBRYGLD_Nov_2002.ofx", O_RDONLY|O_LARGEFILE) = 9
gettimeofday({1040487942, 616257}, NULL) = 0
getpid()                                = 1605
open("/tmp/libofxtmpe8Fgus", O_RDWR|O_CREAT|O_EXCL, 0600) = 10
open("/tmp/libofxtmpe8Fgus", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0664) = 11
rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0
rt_sigsuspend([] <unfinished ...>
--- SIGINT (Interrupt) ---
+++ killed by SIGINT +++

Interrupted by a ^C. Process seems to hang in rt_sigsuspend()

This started by being intermittant and is now permanent (ie, it happens every time I try to open a file)

Looking at the trace, it appears that a file is being opened twice, once with an exclusive lock, which then hangs.




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-12-21 11:49 -------

Reassigning to the default owner of the component, chris@wilddev.net.

Comment 1 Nigel Titley 2002-12-21 23:52:00 UTC
The problem is deeper than this. Looks like a threads bug in the
kernel which is causing the hang. I'm running 2.4.18-18.7.x, under
Redhat 7.3.

I'll do a bit more hunting.

Damm, I really like the OFX import mechanism.
Comment 2 Nigel Titley 2002-12-22 00:03:22 UTC
Or possibly a problem with gcc. I'm using 

gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)

Is this recent enough?
Comment 3 Christian Stimming 2002-12-28 12:38:27 UTC
gcc shouldn't be a problem. Do you think you can send one of your 
OFX files to Benoit Grégoire <bock@step.polymtl.ca> ? I guess he 
will happily assist in tracking down this bug.
Comment 4 Nigel Titley 2002-12-28 13:20:29 UTC
I have sent an example file to Benoit. We'll see what he comes up with.
Comment 5 Nigel Titley 2002-12-28 16:57:15 UTC
This is still there in the latest gnucash CVS (not surprising as it
seems to be in the OFX library), however just noting for the record.
Comment 6 Nigel Titley 2002-12-28 17:03:12 UTC
Hmm, curiouser and curiouser. I just tried copying the ofx file from
my home directory (which is NFS mounted) to the /tmp directory. Its
loading fine. Is there anything in the ofx library which is sensitive
to whether a file is NFS mounted or not? Does it try to lock the file
or something?
Comment 7 Nigel Titley 2002-12-30 00:25:14 UTC
OK, some more digging around. The NFS issue was a red herring. I can
also make it happen on a local file. It only seems to happen on a OFX
file whose loading has previously been aborted due to a crash (bug
101705). If I make a copy of the file and try to open it, that works.

Hunting through the net I find similar bug reports related to kernel
pthreads support, although none with recent kernels. Why does libofx
need thread support? or is this a requirement of OpenSP?
Comment 8 Nigel Titley 2002-12-30 23:17:24 UTC
Reverted back to the standard RH7.3 version of openjade (1.3.1-4) and
rebuild libofx and gnucash.

Imports now OK. Noted that pthreads lib is now no longer pulled in by
libofx. This seems to have appeared with openSP 1.5 (which is what I
was linking against before).

This confirms my impression that this is a threads issue.
Comment 9 Nigel Titley 2003-01-10 23:58:54 UTC
Note that this (or a very similar bug) has been reported by someone
else on the gnucash-devel list recently. He was running with a very
similar environment, ie RH7.3, OpenSP1.5pre18 (I think). 
Comment 10 Nicholas Piper 2003-05-31 19:09:28 UTC
I have the same problem.

If I use OpenSP 1.4 or 1.5 gnucash hangs when importing an ofx file,
and if I use the version in OpenJade 1.3.1 it doesn't hang, but ofx
fails to read the files correctly (with OJ 1.3.1 ofxdump doesn't work,
either.) 

It doesn't hang though :-)
OpenSP 1.4 and 1.5 both appear to use pthreads, while OJ 1.3.1's
OpenSP doesn't.

Nigel: How did you get libofx to work correctly with OpenJade 1.3.1?

I'm not using a distro, this machine is pretty much rolled myself from
source these days.

gcc 2.95.3
Comment 11 Nigel Titley 2003-05-31 21:47:08 UTC
Hmm, I just restored OpenJade 1.3.1, rebuilt LibOFX, rebuilt Gnucash
(completely, just to make sure) and it started to work. I'm still on
RH7.3, but the kernel is up to 2.4.18-27.7.x.

From various kernel lists I gleaned that signal handling in pthreads
may well still be rather broken. Why OpenSP is using threads is an
interesting question, and one I haven't managed to track down an
answer to.
Comment 12 Nicholas Piper 2003-05-31 22:44:11 UTC
Is it worth asking the OpenJade people to take a look at this bug?
I'm subscribing to openjade-devel. Do you want to post? You know more
about the problem than I do.
Comment 13 Benoit Grégoire 2003-06-01 14:59:11 UTC
I think it's most definitely worth asking the OpenJade people, I never
did because I could never reproduce it.  Do include
libofx-devel@sourceforge in your cc:
Comment 14 Nicholas Piper 2003-06-23 22:40:29 UTC
Mailing openjade-devel@lists.sourceforge.net now.
Comment 15 Nicholas Piper 2003-06-23 22:42:35 UTC
I forgot to cc: libofx-devel@sourceforge, sorry.
Comment 17 Christian Stimming 2004-07-15 08:02:16 UTC
Is this bug still current? Or did it silently go away with any recent openjade,
libofx, gnucash?
Comment 18 Benoit Grégoire 2004-07-15 15:02:15 UTC
I have no idea, I could never reproduce it, and haven't heard any news in 
almost a year.  There were major changes in LibOfx in the interim, which may 
or may not have changed the issue. 
Comment 19 Nigel Titley 2004-07-15 15:31:13 UTC
I haven't seen it for some time. My personal view is that it was a threads 
related issue that went away with changes to libofx and/or the kernel upgrading.

I'm happy for it to be closed.
Comment 20 Benoit Grégoire 2004-07-15 16:05:09 UTC
All right, so I'm closing it. 
Comment 21 Ken Gordon 2004-12-20 17:57:52 UTC
I am new to GC, and am experiencing (a version of?) this bug. OSX 10.3.6,
GC1.8.9 built from scratch including OFX extension using Fink (what else can I
tell you that would be helpful?). 

When I (try to) import an ofx or qfx file, the "Generic import transaction
matcher" window opens but nothing appears in it. Clicking on OK causes the
transaction matcher screen to go away, so I wouldn't describe this as causing
the import to hang.
Comment 22 Collin 2017-07-24 21:11:12 UTC
(In reply to Ken Gordon from comment #21)
> When I (try to) import an ofx or qfx file, the "Generic import transaction
> matcher" window opens but nothing appears in it. Clicking on OK causes the
> transaction matcher screen to go away, so I wouldn't describe this as causing
> the import to hang.

This just started happening to me with my portable version of GnuCash! Well almost... clicking the OK button does nothing in my case...

It was working last week and now it doesn't work to import OFX or QFX but it will still do QIF.  The install that I have on the computer works (same PortableApps version 2.6.17 built from git rev 319375f+ on 2017-07-02) but the one on my thumb drive will not!  Haven't changed anything since the last time when it was working and now it doesn't... weird!

I don't know how to get the trace; new to this whole bug reporting thing...x_X
Comment 23 John Ralls 2018-06-29 20:23:30 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=101738. Please update any external references or bookmarks.