unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Stuck with a strange emacs / openmcl problem
@ 2014-12-03 22:32 Fabrice Popineau
  2014-12-04  6:42 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Popineau @ 2014-12-03 22:32 UTC (permalink / raw)
  To: Emacs developers, openmcl-devel


[-- Attachment #1.1: Type: text/plain, Size: 1474 bytes --]

Emacs 24.4 W32/W64

I'm trying to run Clozure Common Lisp under Emacs / Slime.
Slime lauches CCL and starts the Swank server.
When the process is started by Emacs, I get an error with this backtrace :

? ;Loading #P"c:/Home/.emacs.d/vendor/slime/swank-loader.lisp"...
> Error: Le fournisseur de services demandé n’a pas pu être chargé ou
initialisé.  (error #10106) during socket creation operation in socket
> While executing: SOCKET-ERROR, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
 (223996E8) : 0 (SOCKET-ERROR NIL "socket" 10106 NIL) 1133
 (22399750) : 1 (MAKE-TCP-SOCKET :CONNECT :PASSIVE :LOCAL-PORT 0
:LOCAL-HOST "127.0.0.1" :REUSE-ADDRESS T :BACKLOG 5) 429
 (223997D8) : 2 (MAKE-SOCKET :CONNECT :PASSIVE :LOCAL-PORT 0 :LOCAL-HOST
"127.0.0.1" :REUSE-ADDRESS T :BACKLOG 5) 965

The same thing works if I run OpenCL from the console.
How the fact that the process is run from Emacs could
result in an error from make-tcp-socket ?
Conflict with the winsock2 dll which is loaded by both process ?

I have tried many combinations of CCL and emacs :
- Emacs 24.4 32 bits (GNU version)
- Emacs 24.4 64 bits (my version)
- OpenCL 64 bits (official 1.10 version)
- OpenCL 64 bits (compiled by me with the same toolchain used to compile
Emacs)
- OpenCL 32 bits

I couldn't find a working version. Any idea on how to hunt this ?

Best regards,

-- 
Fabrice

[-- Attachment #1.2: Type: text/html, Size: 1926 bytes --]

[-- Attachment #2: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Openmcl-devel mailing list
Openmcl-devel@clozure.com
https://lists.clozure.com/mailman/listinfo/openmcl-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Stuck with a strange emacs / openmcl problem
  2014-12-03 22:32 Stuck with a strange emacs / openmcl problem Fabrice Popineau
@ 2014-12-04  6:42 ` Eli Zaretskii
  2014-12-04  9:45   ` Fabrice Popineau
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2014-12-04  6:42 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: openmcl-devel, emacs-devel

> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Wed, 3 Dec 2014 23:32:34 +0100
> 
> Emacs 24.4 W32/W64
> 
> I'm trying to run Clozure Common Lisp under Emacs / Slime.
> Slime lauches CCL and starts the Swank server.
> When the process is started by Emacs, I get an error with this backtrace :
> 
> ? ;Loading #P"c:/Home/.emacs.d/vendor/slime/swank-loader.lisp"...
> > Error: Le fournisseur de services demandé n’a pas pu être chargé ou
> initialisé. (error #10106) during socket creation operation in socket

For French-challenged people, this message in English means "The
requested service provider could not be loaded or initialized."

> > While executing: SOCKET-ERROR, in process listener(1).
> > Type :POP to abort, :R for a list of available restarts.
> > Type :? for other options.
> 1 > :b
> (223996E8) : 0 (SOCKET-ERROR NIL "socket" 10106 NIL) 1133
> (22399750) : 1 (MAKE-TCP-SOCKET :CONNECT :PASSIVE :LOCAL-PORT 0 :LOCAL-HOST
> "127.0.0.1" :REUSE-ADDRESS T :BACKLOG 5) 429
> (223997D8) : 2 (MAKE-SOCKET :CONNECT :PASSIVE :LOCAL-PORT 0 :LOCAL-HOST
> "127.0.0.1" :REUSE-ADDRESS T :BACKLOG 5) 965
> 
> The same thing works if I run OpenCL from the console.
> How the fact that the process is run from Emacs could 
> result in an error from make-tcp-socket ?
> Conflict with the winsock2 dll which is loaded by both process ?

Does this happen in "emacs -Q"?  Do you have an emacs-server running?

> I have tried many combinations of CCL and emacs :
> - Emacs 24.4 32 bits (GNU version)
> - Emacs 24.4 64 bits (my version)
> - OpenCL 64 bits (official 1.10 version)
> - OpenCL 64 bits (compiled by me with the same toolchain used to compile Emacs)
> - OpenCL 32 bits
> 
> I couldn't find a working version. Any idea on how to hunt this ?

If "emacs -Q" shows the same problem, I'd suggest using SysInternals
tools to find what exactly happens and why.  ProcessExplorer and
ProcessMonitor come to mind.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Stuck with a strange emacs / openmcl problem
  2014-12-04  6:42 ` Eli Zaretskii
@ 2014-12-04  9:45   ` Fabrice Popineau
  2014-12-04  9:56     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Popineau @ 2014-12-04  9:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: openmcl-devel, Emacs developers


[-- Attachment #1.1.1: Type: text/plain, Size: 722 bytes --]

>
>
> If "emacs -Q" shows the same problem, I'd suggest using SysInternals
> tools to find what exactly happens and why.  ProcessExplorer and
> ProcessMonitor come to mind.
>

Thanks.

Here is what process explorer shows about the process environment :

[image: Images intégrées 1]

It seems to confirm this diagnostic (found with Google, same symptoms,
different context) about the 10106 error :
" On Windows, if the environment is not copied the SYSTEMROOT environment
variable won't be available and PHP will have problems loading Winsock."

So it seems that OpenMCL is run without inheriting any environment, which
is not good.
I don't see (yet) why the environment is not inherited.

Fabrice

[-- Attachment #1.1.2: Type: text/html, Size: 1674 bytes --]

[-- Attachment #1.2: image.png --]
[-- Type: image/png, Size: 37962 bytes --]

[-- Attachment #2: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Openmcl-devel mailing list
Openmcl-devel@clozure.com
https://lists.clozure.com/mailman/listinfo/openmcl-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Stuck with a strange emacs / openmcl problem
  2014-12-04  9:45   ` Fabrice Popineau
@ 2014-12-04  9:56     ` Eli Zaretskii
  2014-12-04 15:24       ` Fabrice Popineau
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2014-12-04  9:56 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: openmcl-devel, emacs-devel

> From: Fabrice Popineau <fabrice.popineau@gmail.com>
> Date: Thu, 4 Dec 2014 10:45:30 +0100
> Cc: openmcl-devel <openmcl-devel@clozure.com>,
> 	Emacs developers <emacs-devel@gnu.org>
> 
> It seems to confirm this diagnostic (found with Google, same symptoms,
> different context) about the 10106 error :
> " On Windows, if the environment is not copied the SYSTEMROOT environment
> variable won't be available and PHP will have problems loading Winsock."
> 
> So it seems that OpenMCL is run without inheriting any environment, which is
> not good.
> I don't see (yet) why the environment is not inherited.

Can you describe how does Emacs invoke OpenMCL, exactly?  IOW, with
which Emacs command it is invoked, does the invocation go through a
shell (and if so, which shell), etc.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Stuck with a strange emacs / openmcl problem
  2014-12-04  9:56     ` Eli Zaretskii
@ 2014-12-04 15:24       ` Fabrice Popineau
  2014-12-04 15:55         ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Popineau @ 2014-12-04 15:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: openmcl-devel, Emacs developers


[-- Attachment #1.1: Type: text/plain, Size: 870 bytes --]

>
> Can you describe how does Emacs invoke OpenMCL, exactly?  IOW, with
> which Emacs command it is invoked, does the invocation go through a
> shell (and if so, which shell), etc.
>

Problem closed.

OpenMCL is started by comint-exec. The process-env variable was trashed by
a spurious Slime configuration variable of mine.

You can actually do :

(let ((process-environment (append "foo=bar" process-environment)))
  process-environment)
(102 111 111 61 98 97 114
"TEXINPUTS=.;c:/Home/.emacs.d/elpa/auctex-11.88/latex;" ...

:-( I'm not sure if something can be done at the emacs level to check that
this sensitive variable is not destroyed.

For the record, it it useful to know that this 10106 winsock error relates
to SYSTEMROOT environment variable being not defined.

Once the environment is properly passed to comint-exec, everything works as
expected.

Fabrice

[-- Attachment #1.2: Type: text/html, Size: 1804 bytes --]

[-- Attachment #2: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Openmcl-devel mailing list
Openmcl-devel@clozure.com
https://lists.clozure.com/mailman/listinfo/openmcl-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Stuck with a strange emacs / openmcl problem
  2014-12-04 15:24       ` Fabrice Popineau
@ 2014-12-04 15:55         ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2014-12-04 15:55 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: Eli Zaretskii, openmcl-devel, Emacs developers

> (let ((process-environment (append "foo=bar" process-environment)))
>   process-environment)
> (102 111 111 61 98 97 114
> "TEXINPUTS=.;c:/Home/.emacs.d/elpa/auctex-11.88/latex;" ...

> :-( I'm not sure if something can be done at the emacs level to check that
> this sensitive variable is not destroyed.

We definitely could degrade more gracefully: we should signal an
error when faced with a process-environment that is not a list of strings.


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-04 15:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 22:32 Stuck with a strange emacs / openmcl problem Fabrice Popineau
2014-12-04  6:42 ` Eli Zaretskii
2014-12-04  9:45   ` Fabrice Popineau
2014-12-04  9:56     ` Eli Zaretskii
2014-12-04 15:24       ` Fabrice Popineau
2014-12-04 15:55         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).