Thread: [Refdb-users] addnote in 9.4-prerelease 3
Status: Beta
Brought to you by:
mhoenicka
|
From: Matt P. <mat...@ut...> - 2004-02-09 22:28:39
|
Hi everyone, running into a little bit of trouble writing this php script to get refdb to add notes via a web form. (In fact, the overhealming paucity of my programming skills is making this WAY more difficult than it hsould be). but at least one problem seems to be with refdb itself: I don't seem to be able to add notes at all. so for instance this command: /usr/local/bin/refdbc -u [deleted] -d bib_test -w [deleted] -C addnote /usr/local/share/refdb/examples/xnoteset.xml gives this output: numerical ID ignored 0 note(s) added, 0 skipped, 0 failed and this error on quit: free(): invalid pointer 0x80641b0! I assume there are no problems with xnoteset.xml, which is why I used it. Is this possibly a bug with pre3? DOes this mean, then, th at I have to upgrade -- and does that furtherm ean i have to do somethiing extreme with libdbi or something? I will if I have to, but own't if I can avoid it... anyway, thanks, matt |
|
From: Markus H. <mar...@mh...> - 2004-02-10 02:10:12
|
Matt Price writes: > but at least one problem seems to be with refdb itself: I don't seem > to be able to add notes at all. so for instance this command: > > /usr/local/bin/refdbc -u [deleted] -d bib_test -w [deleted] -C addnote /usr/local/share/refdb/examples/xnoteset.xml > > gives this output: > > numerical ID ignored > 0 note(s) added, 0 skipped, 0 failed > > and this error on quit: > free(): invalid pointer 0x80641b0! > Do you get this free() error on the client side? I haven't seen this yet. Otherwise your best bet is to try the latest prerelease (and the test data included in that release, there might be subtle changes). The notes stuff did have some serious problems in earlier prereleases, although I was usually able to add notes on my system. Using the latest prerelease requires the latest libdbi (0.7.2) and libdbi-drivers (0.7.1) versions, but they should build out of the box on most systems. Let me know if you need further assistance. If this doesn't help, please run the server with a log level of 7 and post the log. This might give a clue about what is going wrong. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
|
From: Matt P. <mat...@ut...> - 2004-02-10 03:09:05
|
you're up late! > > Do you get this free() error on the client side? I haven't seen this > yet. um, I htink so. It's waiting in stdout when I exit from refdbc. > > Otherwise your best bet is to try the latest prerelease (and the test > data included in that release, there might be subtle changes). The notes > stuff did have some serious problems in earlier prereleases, although > I was usually able to add notes on my system. Using the latest > prerelease requires the latest libdbi (0.7.2) and libdbi-drivers > (0.7.1) versions, but they should build out of the box on most > systems. Let me know if you need further assistance. > > If this doesn't help, please run the server with a log level of 7 and > post the log. This might give a clue about what is going wrong. loglevel 7 means loglevel=debug in refdbdrc, right? > regards, > Markus > so, decided I needed to install the latest preleease and took the plunge with libdbi 0.7. old libdbd-mysql & libdbd-pgsql files, so now I'm kinda screwed with regards to my previous installation of refdb. ANyway, there are no debian packages for libdbi-drivers, so I compiled them myself; didn't notice any problems. Then I compiled the latest refdb-prerelease, ./configure, make,install; no problems. But I can't run refdbd; when I try the configuration tests suggested in the manual, I get the following: $ sudo refdbd -s -e 0 -l 7 dbi_driver_dir went to: libdbi: Failed to load driver: /usr/lib/dbd/libsqlite_dbi.so dbi is up using default driver dir Initialized libdbi, but no drivers were found! ------------------- notice dbi_driver_dir seems to point nowhere! on the other hand /usr/lib/dbd/libsqlite_dbi.so does exist, but it's the old version, check out the date: ---------- $ ll /usr/lib/dbd/libsqlite_dbi.so -rw-r--r-- 1 root root 23020 2003-04-15 23:13 /usr/lib/dbd/libsqlite_dbi.so ------------ The new drivers installed in /usr/local/lib/dbd: # ll /usr/local/lib/dbd total 160 -rw-r--r-- 1 root staff 16374 2004-02-09 21:36 libmysql.a -rwxr-xr-x 1 root staff 882 2004-02-09 21:36 libmysql.la -rwxr-xr-x 1 root staff 23045 2004-02-09 21:36 libmysql.so -rw-r--r-- 1 root staff 21658 2004-02-09 21:36 libpgsql.a -rwxr-xr-x 1 root staff 823 2004-02-09 21:36 libpgsql.la -rwxr-xr-x 1 root staff 29685 2004-02-09 21:36 libpgsql.so -rw-r--r-- 1 root staff 20230 2004-02-09 21:36 libsqlite.a -rwxr-xr-x 1 root staff 847 2004-02-09 21:36 libsqlite.la -rwxr-xr-x 1 root staff 29363 2004-02-09 21:36 libsqlite.so ------------ sooo... I'm wondering if I have to set a variable somewhere. I notice in ./configure --help this line: --with-libdbi-lib=DIR Find libdbi lib in DIR but I'm assuming this is for libdbi itself, not for the driver, right? Meanwhile, I set dbi_driverdir in /etc/refdbdrc: dbi_driverdir /usr/local/lib/dbd for good measure, I even tried this in addition: dbi_driver_dir /usr/local/lib/dbd ------------ so far, no dice. soooo... any hints? thanks as always, matt |
|
From: Marc H. <mar...@fr...> - 2004-02-10 09:21:24
|
On Mon, 9 Feb 2004, Matt Price wrote: > so, decided I needed to install the latest preleease and took the > plunge with libdbi 0.7. old libdbd-mysql & libdbd-pgsql files, so now > I'm kinda screwed with regards to my previous installation of refdb. > ANyway, there are no debian packages for libdbi-drivers, so I compiled > them myself; didn't notice any problems. Then I compiled the latest > refdb-prerelease, ./configure, make,install; no problems. But I can't > run refdbd; when I try the configuration tests suggested in the > manual, I get the following: I strongly recommend "stow" to anyone wanting to quickly switch between different versions of refdb/libdbi/whatever. I use it since months and it is a real relief. Thanks to a clever and automated use of symbolic links, it is completely transparent to applications; they just can't tell they are "stowed". Caveat: I am afraid symbolic links do not work well with Windows. The "HOWTO use stow" is so short that I can write it here right away: To install version123 cd refdbversion123 ./configure make make install prefix=/usr/local/stow/refdbversion123 To enable version123 cd /usr/local/stow stow refdbversion123 To switch to version456 cd /usr/local/stow stow --delete refdbversion123 stow refdbversion456 and so on... see the attached documentation for more details. |
|
From: Matt P. <mat...@ut...> - 2004-02-10 11:33:03
|
On Tue, Feb 10, 2004 at 10:21:31AM +0100, Marc Herbert wrote: > On Mon, 9 Feb 2004, Matt Price wrote: > > > so, decided I needed to install the latest preleease and took the > > plunge with libdbi 0.7. old libdbd-mysql & libdbd-pgsql files, so now > > I'm kinda screwed with regards to my previous installation of refdb. > > ANyway, there are no debian packages for libdbi-drivers, so I compiled > > them myself; didn't notice any problems. Then I compiled the latest > > refdb-prerelease, ./configure, make,install; no problems. But I can't > > run refdbd; when I try the configuration tests suggested in the > > manual, I get the following: > > I strongly recommend "stow" to anyone wanting to quickly switch > between different versions of refdb/libdbi/whatever. I use it since > months and it is a real relief. Thanks to a clever and automated use > of symbolic links, it is completely transparent to applications; they > just can't tell they are "stowed". Caveat: I am afraid symbolic links > do not work well with Windows. jeez, his sounds great. A bit late for my current situation I think (b/c I was using debian packaging for my earlier installation of libdbi etc...) but I will check ito ut! matt |
|
From: Markus H. <mar...@mh...> - 2004-02-10 21:00:58
|
Matt Price writes: > you're up late! > Yeah, tell me about it! My dayjob is too busy these days. > > > > Do you get this free() error on the client side? I haven't seen this > > yet. > > um, I htink so. It's waiting in stdout when I exit from refdbc. > > Ok, I'll check with the latest prerelease using valgrind. > dbi_driver_dir went to: > > libdbi: Failed to load driver: /usr/lib/dbd/libsqlite_dbi.so > dbi is up using default driver dir > Initialized libdbi, but no drivers were found! > ------------------- > notice dbi_driver_dir seems to point nowhere! on the other hand > /usr/lib/dbd/libsqlite_dbi.so does exist, but it's the old version, > check out the date: > This is ok. dbi_driver_dir contains a custom driver directory or nothing if you want to use the compile-time default. You're doing the latter, as indicated two lines further down. > ---------- > $ ll /usr/lib/dbd/libsqlite_dbi.so > -rw-r--r-- 1 root root 23020 2003-04-15 23:13 /usr/lib/dbd/libsqlite_dbi.so > ------------ > > The new drivers installed in /usr/local/lib/dbd: > # ll /usr/local/lib/dbd > total 160 > -rw-r--r-- 1 root staff 16374 2004-02-09 21:36 libmysql.a > -rwxr-xr-x 1 root staff 882 2004-02-09 21:36 libmysql.la > -rwxr-xr-x 1 root staff 23045 2004-02-09 21:36 libmysql.so > -rw-r--r-- 1 root staff 21658 2004-02-09 21:36 libpgsql.a > -rwxr-xr-x 1 root staff 823 2004-02-09 21:36 libpgsql.la > -rwxr-xr-x 1 root staff 29685 2004-02-09 21:36 libpgsql.so > -rw-r--r-- 1 root staff 20230 2004-02-09 21:36 libsqlite.a > -rwxr-xr-x 1 root staff 847 2004-02-09 21:36 libsqlite.la > -rwxr-xr-x 1 root staff 29363 2004-02-09 21:36 libsqlite.so > ------------ > sooo... > I'm wondering if I have to set a variable somewhere. I notice in > ./configure --help this line: > --with-libdbi-lib=DIR Find libdbi lib in DIR > but I'm assuming this is for libdbi itself, not for the driver, right? > This is correct. This setting is for libdbi.so, not for the drivers. > Meanwhile, I set dbi_driverdir in /etc/refdbdrc: > dbi_driverdir /usr/local/lib/dbd > This should work, although it should not be necessary. > for good measure, I even tried this in addition: > dbi_driver_dir /usr/local/lib/dbd > This shouldn't work. > > ------------ > so far, no dice. > > soooo... any hints? > This all looks pretty wacky, I guess there's more than just one problem. First of all, you should always test your libdbi-drivers installation. That is, after: (libdbi) make && make install (libdbi-drivers) make && make install you should run (libdbi-drivers) make check This will tell you whether the lib itself works properly. I believe one of your problems is that some of the older files are still present on your system. When you start refdbd, it tries to load the drivers from /usr/lib/dbi which indicates that refdbd is linked against the Debian version of libdbi (they put everything into /usr; scratchbuilt stuff goes into /usr/local). Make sure you delete the Debian packages for libdbi and the drivers, plus the development packages. Then you'll have to rebuild libdbi-drivers as they are most likely built using the old development files. After that, make check should work and refdbd should start up ok. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
|
From: Matt P. <mat...@ut...> - 2004-02-10 23:08:06
|
Markus, first thanks for the help with libdbi. Oddly, simply compiling the libdbi package from scratch didn't work; so I reinstalled the debian package and made some symlinks and viola, it seems to work now. I also got rid of the old libdbd-sqlite package htat had been hanging around, so now I think there are no conflicts. So I believe the libdbi problems are solved -- which still doesn't explain why I can't add notes. Oh, also thanks for help on cvs. I, er, I don't usually have to do autogen.sh because I'm just a widdle itsy bitsy user and I'd never paid attention to thatpart before... anyway, compiles fine now. So, still have a problem: On Tue, Feb 10, 2004 at 03:06:54AM +0100, Markus Hoenicka wrote: > Matt Price writes: > > > > and this error on quit: > > free(): invalid pointer 0x80641b0! > > > > Do you get this free() error on the client side? I haven't seen this > yet. the error persists, andd I'm unable to add notes of any kind. Sometimes I get a segmentation fault as well (!).... but I just tried the same process with a new database -- and it worked! I guess the database got corrupted somehow -- this may well have been the result of my broken php scripts. So thanks! And more soon. Alles beste, bis... sehr bald wahrscheinlich, matt |
|
From: Matt P. <mat...@ut...> - 2004-02-10 23:13:44
|
hey markus, the segfault and the free() error are back when i try to addnote... sorry to report that... matt |
|
From: Markus H. <mar...@mh...> - 2004-02-11 00:21:15
|
Matt Price writes: > hey markus, the segfault and the free() error are back when i try to > addnote... > > sorry to report that... Nothing to apologize for. If it's broke, I'll have to fix it... Would you mind sending me a minimal set of data and the sequence of commands you used to reproduce the crash over here? I tried, but all goes well. And please send the refdbd log with log level 7 as well. Thanks, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
|
From: Markus H. <mar...@mh...> - 2004-02-11 22:26:17
|
Matt Price writes:
> hey markus, the segfault and the free() error are back when i try to
> addnote...
>
> sorry to report that...
> matt
Turns out this was one of these bugs that are silent on FreeBSD. I
managed to reproduce the problem on Debian. Stupid me! The following
patch fixes the problem. I've also updated the file in CVS.
BTW: so much about temporary hacks. They've been in place for three
years...
--- refdbc.c.orig Wed Feb 11 23:08:15 2004
+++ refdbc.c Wed Feb 11 23:08:41 2004
@@ -3507,7 +3507,7 @@
}
/* the following is a temporary hack to allow cmdln_tokenize to work */
- newarg = (char*)malloc((size_t)(strlen(arg)+8));
+ newarg = (char*)malloc((size_t)(strlen(arg)+9));
if (newarg == NULL) {
delete_all_lilimem(&sentinel);
return 1;
@@ -4399,7 +4399,7 @@
}
/* the following is a temporary hack to allow cmdln_tokenize to work */
- newarg = (char*)malloc((size_t)(strlen(arg)+8));
+ newarg = (char*)malloc((size_t)(strlen(arg)+9));
if (newarg == NULL) {
delete_all_lilimem(&sentinel);
return 1;
regards,
Markus
--
Markus Hoenicka
mar...@ca...
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de
|