Thread: [Sqlrelay-discussion] sqlrsh hanging on openbsd
Brought to you by:
mused
From: Jolan L. <jo...@pr...> - 2005-05-27 04:44:50
|
hi, i'm trying to get sqlrelay-0.36.2 running on openbsd/i386 with a sqlite3 database. i'm using the sqlrelay.conf from: http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/sqlite.html with the only modifications being the database path and runas group/user. i am using sqlrelay.dtd from the distribution as well. the output from 'sqlr-start -id sqlitetest' looks fine: Starting listener: sqlr-listener -id sqlitetest -config /etc/pkg/sqlrelay.conf Starting 3 connections to sqlitetest : sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf Starting scaler: sqlr-scaler -id sqlitetest -config /etc/pkg/sqlrelay.conf Starting cache manager: sqlr-cachemanager 'sqlrsh -id sqlitetest' semms to connect ok: SQLRShell - Version 0.22 Connected to: localhost:9000 as sqlitetest type help; for a help. 0> but after running "help;", it just hangs. shutting things down via 'sqlr-stop sqlitetest' doesn't seem to work either: Killing the following processes: All processes killed. but ps auwwx |grep sqlr shows 6 processes still running. any ideas on what to check or some pointers on how to debug what's going on? thanks, - jolan |
From: David M. <dav...@fi...> - 2005-05-30 21:41:44
|
I just figured out the problem with sqlrsh. sqlrsh can use the readline library, and there appears to be a bug in the code that gets compiled if the readline library is absent. You can fix the problem by either installing the readline library package and rebuilding or by editing src/cmdline/sqlrsh.C and changing: #ifndef HAVE_READLINE sqlrsh::sqlrsh() { standardin.setFileDescriptor(0); } #endif to: #ifndef HAVE_READLINE sqlrsh::sqlrsh() { standardin.setFileDescriptor(0); standardin.allowShortReads(); } #endif I'll make a maintenance release soon with this fix. As for sqlr-stop not working, I'll need to look into that a bit more. Dave dav...@fi... On Thu, 2005-05-26 at 23:42 -0500, Jolan Luff wrote: > hi, > > i'm trying to get sqlrelay-0.36.2 running on openbsd/i386 with a sqlite3 > database. > > i'm using the sqlrelay.conf from: > > http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/sqlite.html > > with the only modifications being the database path and runas > group/user. i am using sqlrelay.dtd from the distribution as well. > > the output from 'sqlr-start -id sqlitetest' looks fine: > > Starting listener: > sqlr-listener -id sqlitetest -config /etc/pkg/sqlrelay.conf > > Starting 3 connections to sqlitetest : > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > > Starting scaler: > sqlr-scaler -id sqlitetest -config /etc/pkg/sqlrelay.conf > > Starting cache manager: > sqlr-cachemanager > > 'sqlrsh -id sqlitetest' semms to connect ok: > > SQLRShell - Version 0.22 > Connected to: localhost:9000 as sqlitetest > > type help; for a help. > > 0> > > but after running "help;", it just hangs. > > shutting things down via 'sqlr-stop sqlitetest' doesn't seem to work either: > > Killing the following processes: > All processes killed. > > but ps auwwx |grep sqlr shows 6 processes still running. > > any ideas on what to check or some pointers on how to debug what's going > on? > > thanks, > - jolan > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
From: Jolan L. <jo...@pr...> - 2005-06-01 15:37:25
|
On Mon, May 30, 2005 at 05:42:26PM -0400, David Muse wrote: > I just figured out the problem with sqlrsh. sqlrsh can use the readline > library, and there appears to be a bug in the code that gets compiled if > the readline library is absent. thanks for looking into this for me. openbsd has shipped with readline for quite some time. i looked at config.log and the readline tests fail because the tests try to link with -lhistory which doesn't exist on openbsd. the history functions are in -lreadline. > You can fix the problem by either installing the readline library > package and rebuilding or by editing src/cmdline/sqlrsh.C and changing: > > #ifndef HAVE_READLINE > sqlrsh::sqlrsh() { > standardin.setFileDescriptor(0); > } > #endif > > to: > > #ifndef HAVE_READLINE > sqlrsh::sqlrsh() { > standardin.setFileDescriptor(0); > standardin.allowShortReads(); > } > #endif > > > I'll make a maintenance release soon with this fix. > > As for sqlr-stop not working, I'll need to look into that a bit more. > > > Dave > dav...@fi... > > > On Thu, 2005-05-26 at 23:42 -0500, Jolan Luff wrote: > > hi, > > > > i'm trying to get sqlrelay-0.36.2 running on openbsd/i386 with a sqlite3 > > database. > > > > i'm using the sqlrelay.conf from: > > > > http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/sqlite.html > > > > with the only modifications being the database path and runas > > group/user. i am using sqlrelay.dtd from the distribution as well. > > > > the output from 'sqlr-start -id sqlitetest' looks fine: > > > > Starting listener: > > sqlr-listener -id sqlitetest -config /etc/pkg/sqlrelay.conf > > > > Starting 3 connections to sqlitetest : > > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > > > > Starting scaler: > > sqlr-scaler -id sqlitetest -config /etc/pkg/sqlrelay.conf > > > > Starting cache manager: > > sqlr-cachemanager > > > > 'sqlrsh -id sqlitetest' semms to connect ok: > > > > SQLRShell - Version 0.22 > > Connected to: localhost:9000 as sqlitetest > > > > type help; for a help. > > > > 0> > > > > but after running "help;", it just hangs. > > > > shutting things down via 'sqlr-stop sqlitetest' doesn't seem to work either: > > > > Killing the following processes: > > All processes killed. > > > > but ps auwwx |grep sqlr shows 6 processes still running. > > > > any ideas on what to check or some pointers on how to debug what's going > > on? > > > > thanks, > > - jolan > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by Yahoo. > > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > > Search APIs Find out how you can build Yahoo! directly into your own > > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > > _______________________________________________ > > Sqlrelay-discussion mailing list > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
From: David M. <dav...@fi...> - 2005-06-02 03:52:39
|
I just made a maintenance release, give it a try. It should detect readline properly now and work even if you disable readline support. I had some strange problems when I tested it on openbsd though. All of my queries failed with authentication errors and 2 sqlr-listener processes were getting spawned off for each client connection. It's possible that it won't happen on real hardware though. I was running OpenBSD-3.7 in vmware and vmware doesn't officially support openbsd. Give it a try and let me know. Dave dav...@fi... On Wed, 2005-06-01 at 10:34 -0500, Jolan Luff wrote: > On Mon, May 30, 2005 at 05:42:26PM -0400, David Muse wrote: > > I just figured out the problem with sqlrsh. sqlrsh can use the readline > > library, and there appears to be a bug in the code that gets compiled if > > the readline library is absent. > > thanks for looking into this for me. openbsd has shipped with readline > for quite some time. i looked at config.log and the readline tests fail > because the tests try to link with -lhistory which doesn't exist on > openbsd. the history functions are in -lreadline. > > > You can fix the problem by either installing the readline library > > package and rebuilding or by editing src/cmdline/sqlrsh.C and changing: > > > > #ifndef HAVE_READLINE > > sqlrsh::sqlrsh() { > > standardin.setFileDescriptor(0); > > } > > #endif > > > > to: > > > > #ifndef HAVE_READLINE > > sqlrsh::sqlrsh() { > > standardin.setFileDescriptor(0); > > standardin.allowShortReads(); > > } > > #endif > > > > > > I'll make a maintenance release soon with this fix. > > > > As for sqlr-stop not working, I'll need to look into that a bit more. > > > > > > Dave > > dav...@fi... > > > > > > On Thu, 2005-05-26 at 23:42 -0500, Jolan Luff wrote: > > > hi, > > > > > > i'm trying to get sqlrelay-0.36.2 running on openbsd/i386 with a sqlite3 > > > database. > > > > > > i'm using the sqlrelay.conf from: > > > > > > http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/sqlite.html > > > > > > with the only modifications being the database path and runas > > > group/user. i am using sqlrelay.dtd from the distribution as well. > > > > > > the output from 'sqlr-start -id sqlitetest' looks fine: > > > > > > Starting listener: > > > sqlr-listener -id sqlitetest -config /etc/pkg/sqlrelay.conf > > > > > > Starting 3 connections to sqlitetest : > > > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > > > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > > > sqlr-connection-sqlite -id sqlitetest -connectionid sqlitetest -config /etc/pkg/sqlrelay.conf > > > > > > Starting scaler: > > > sqlr-scaler -id sqlitetest -config /etc/pkg/sqlrelay.conf > > > > > > Starting cache manager: > > > sqlr-cachemanager > > > > > > 'sqlrsh -id sqlitetest' semms to connect ok: > > > > > > SQLRShell - Version 0.22 > > > Connected to: localhost:9000 as sqlitetest > > > > > > type help; for a help. > > > > > > 0> > > > > > > but after running "help;", it just hangs. > > > > > > shutting things down via 'sqlr-stop sqlitetest' doesn't seem to work either: > > > > > > Killing the following processes: > > > All processes killed. > > > > > > but ps auwwx |grep sqlr shows 6 processes still running. > > > > > > any ideas on what to check or some pointers on how to debug what's going > > > on? > > > > > > thanks, > > > - jolan > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by Yahoo. > > > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > > > Search APIs Find out how you can build Yahoo! directly into your own > > > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > > > _______________________________________________ > > > Sqlrelay-discussion mailing list > > > Sql...@li... > > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by Yahoo. > > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > > Search APIs Find out how you can build Yahoo! directly into your own > > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > > _______________________________________________ > > Sqlrelay-discussion mailing list > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
From: Jolan L. <jo...@pr...> - 2005-06-03 05:08:14
|
On Wed, Jun 01, 2005 at 11:53:25PM -0400, David Muse wrote: > I just made a maintenance release, give it a try. It should detect > readline properly now and work even if you disable readline support. > > I had some strange problems when I tested it on openbsd though. All of > my queries failed with authentication errors and 2 sqlr-listener > processes were getting spawned off for each client connection. It's > possible that it won't happen on real hardware though. I was running > OpenBSD-3.7 in vmware and vmware doesn't officially support openbsd. > > Give it a try and let me know. readline support is working now, thank you. i noticed during the build i get a stream of 'rm: : Invalid argument' after every g++ invocation which did not happen before. as far as running it, i am seeing the same problem you are with real hardware: $ sudo sqlrsh -id sqlitetest SQLRShell - Version 0.22 Connected to: localhost:9000 as sqlitetest type help; for a help. 0> debug on; 0> SELECT sqlite_version(); Result Set Buffer Size: 100 Connecting to listener... Unix socket: /tmp/sqlitetest.socket Authenticating with listener : sqlitetest:sqlitetest No authentication error. Must Not Reconnect. Authenticating with connection : sqlitetest:sqlitetest Broken pipe Exit 141 and if I run sqlrsh -id sqlitetest without sudo sqlrsh crashes right away. maybe this is due to failing to drop privileges? |
From: Firstworks/4access <dav...@fi...> - 2005-06-09 18:13:36
|
On Fri, 2005-06-03 at 00:05 -0500, Jolan Luff wrote: > On Wed, Jun 01, 2005 at 11:53:25PM -0400, David Muse wrote: > > I just made a maintenance release, give it a try. It should detect > > readline properly now and work even if you disable readline support. > > > > I had some strange problems when I tested it on openbsd though. All of > > my queries failed with authentication errors and 2 sqlr-listener > > processes were getting spawned off for each client connection. It's > > possible that it won't happen on real hardware though. I was running > > OpenBSD-3.7 in vmware and vmware doesn't officially support openbsd. > > > > Give it a try and let me know. > > readline support is working now, thank you. > > i noticed during the build i get a stream of 'rm: : Invalid argument' > after every g++ invocation which did not happen before. > > as far as running it, i am seeing the same problem you are with real > hardware: > > $ sudo sqlrsh -id sqlitetest > SQLRShell - Version 0.22 > Connected to: localhost:9000 as sqlitetest > > type help; for a help. > > 0> debug on; > 0> SELECT sqlite_version(); > Result Set Buffer Size: 100 > Connecting to listener... > Unix socket: /tmp/sqlitetest.socket > Authenticating with listener : sqlitetest:sqlitetest > No authentication error. > Must Not Reconnect. > Authenticating with connection : sqlitetest:sqlitetest > Broken pipe > Exit 141 > > and if I run sqlrsh -id sqlitetest without sudo sqlrsh crashes right > away. maybe this is due to failing to drop privileges? I'll look into this a little more. So far, it appears to only be a problem under OpenBSD. It looks like there's an error passing file descriptors between processes. The most recent release of OpenBSD did a really strange thing with a macro related to passing file descriptors. The macro contained function calls and thus couldn't be used at compile time to determine the size of a struct. I had to fudge the code to make it work. Maybe it doesn't really work :) Try setting handoff="reconnect" in the sqlrelay.conf file and see if that doesn't make it work. It's less efficient, but it might work. Dave dav...@fi... |
From: Jolan L. <jo...@pr...> - 2005-06-10 04:36:08
|
On Thu, Jun 09, 2005 at 02:14:49PM -0400, Firstworks/4access wrote: > On Fri, 2005-06-03 at 00:05 -0500, Jolan Luff wrote: > > On Wed, Jun 01, 2005 at 11:53:25PM -0400, David Muse wrote: > > > I just made a maintenance release, give it a try. It should detect > > > readline properly now and work even if you disable readline support. > > > > > > I had some strange problems when I tested it on openbsd though. All of > > > my queries failed with authentication errors and 2 sqlr-listener > > > processes were getting spawned off for each client connection. It's > > > possible that it won't happen on real hardware though. I was running > > > OpenBSD-3.7 in vmware and vmware doesn't officially support openbsd. > > > > > > Give it a try and let me know. > > > > readline support is working now, thank you. > > > > i noticed during the build i get a stream of 'rm: : Invalid argument' > > after every g++ invocation which did not happen before. > > > > as far as running it, i am seeing the same problem you are with real > > hardware: > > > > $ sudo sqlrsh -id sqlitetest > > SQLRShell - Version 0.22 > > Connected to: localhost:9000 as sqlitetest > > > > type help; for a help. > > > > 0> debug on; > > 0> SELECT sqlite_version(); > > Result Set Buffer Size: 100 > > Connecting to listener... > > Unix socket: /tmp/sqlitetest.socket > > Authenticating with listener : sqlitetest:sqlitetest > > No authentication error. > > Must Not Reconnect. > > Authenticating with connection : sqlitetest:sqlitetest > > Broken pipe > > Exit 141 > > > > and if I run sqlrsh -id sqlitetest without sudo sqlrsh crashes right > > away. maybe this is due to failing to drop privileges? > > I'll look into this a little more. So far, it appears to only be a > problem under OpenBSD. It looks like there's an error passing file > descriptors between processes. The most recent release of OpenBSD did a > really strange thing with a macro related to passing file descriptors. > The macro contained function calls and thus couldn't be used at compile > time to determine the size of a struct. I had to fudge the code to make > it work. Maybe it doesn't really work :) > > Try setting handoff="reconnect" in the sqlrelay.conf file and see if > that doesn't make it work. It's less efficient, but it might work. using handoff="reconnect" let's me execute queries, thanks. |