Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling 'nytprofhtml' emits error messages about WSL interoperability. #221

Open
jkeenan opened this issue Sep 6, 2024 · 4 comments
Open
Labels

Comments

@jkeenan
Copy link
Collaborator

jkeenan commented Sep 6, 2024

I am encountering some problems in the execution of nytprofhtml on Ubuntu Linux 22.04 LTS. Here is my environment:

$ uname -a
Linux tpadx1 6.8.0-40-generic #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

$ perl -v | head -2 | tail -1
This is perl 5, version 40, subversion 0 (v5.40.0) built for x86_64-linux

$ perl -MDevel::NYTProf -E 'say $Devel::NYTProf::VERSION;' 2>/dev/null
6.14

I have a locally installed Perl program called get-pod-outline. It takes a single argument: a path to a POD file. I go to profile it.

$ perl -d:NYTProf /home/jkeenan/bin/perl/get-pod-outline /home/jkeenan/gitwork/perl/pod/perldelta.pod

[0906-01] 2066 $ nytprofhtml --open
Reading nytprof.out
Processing nytprof.out data
Writing line reports to nytprof directory
 100% ... 
Extracting subroutine call data ...
Extracting subroutine links
Generating subroutine stack flame graph ...
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
WSL Interopability is disabled. Please enable it before using WSL.
grep: /proc/sys/fs/binfmt_misc/WSLInterop: No such file or directory
[0906-01] 2067 $ [error] WSL Interoperability is disabled. Please enable it before using WSL.
/usr/bin/wslview: line 216: /mnt/c/Windows/System32/reg.exe: No such file or directory
/usr/bin/wslview: line 308: [: -ge: unary operator expected
[error] This protocol is not supported before version 1903.
^C

The program hangs here. Once I Ctrl-C, I get the files I expect in the nytprof/ subdirectory.

I have never attempted to install or use WSL interoperability on this Ubuntu 22.04 LTS machine, so I don't understand why I am getting these error messages. Moreover, I searched for WSL in my checkout of the master branch and came up with nothing.

Can anyone provide guidance?

@choroba
Copy link

choroba commented Sep 6, 2024

Does it happen without --open, too?

@jkeenan
Copy link
Collaborator Author

jkeenan commented Sep 6, 2024

Does it happen without --open, too?

No.

 $ nytprofhtml -o /tmp/0906-02
Reading nytprof.out
Processing nytprof.out data
Writing line reports to /tmp/0906-02 directory
 100% ... 
Extracting subroutine call data ...
Extracting subroutine links
Generating subroutine stack flame graph ...

$ ls -ltr 0906-02
total 2872
-rw-rw-r-- 1 jkeenan jkeenan   3380 Sep  6 13:05  style.css
-rw-rw-r-- 1 jkeenan jkeenan  37780 Sep  6 13:05  home-jkeenan-bin-perl-get-pod-outline-1-line.html
-rw-rw-r-- 1 jkeenan jkeenan 131949 Sep  6 13:05  warnings-pm-2-line.html
...
-rw-rw-r-- 1 jkeenan jkeenan   2850 Sep  6 13:06  packages-callgraph.dot
-rw-rw-r-- 1 jkeenan jkeenan  24832 Sep  6 13:06  subs-callgraph.dot
-rw-rw-r-- 1 jkeenan jkeenan  28225 Sep  6 13:06  index.html
drwxrwxr-x 3 jkeenan jkeenan   4096 Sep  6 13:06  js

@choroba
Copy link

choroba commented Sep 6, 2024

No.

That means the problem probably comes from running the browser.

@jkeenan
Copy link
Collaborator Author

jkeenan commented Sep 6, 2024

No.

That means the problem probably comes from running the browser.

A recognized problem, apparently.

commit 65cb2634f880985697210ca4dbebecc3cf9c90be
Author:     Tim Bunce <[email protected]>
AuthorDate: Fri Jun 15 16:04:32 2012 +0000
Commit:     Tim Bunce <[email protected]>
CommitDate: Fri Jun 15 16:04:32 2012 +0000

    Add --debug, add --open docs, use Browser::Open if available, rework related logic.
    
...    

It is likely that I never previously had occasion to run a freestanding instance of nytprofhtml. Out of time now; will have to debug further later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants