pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


backup patches 2024-01-20
Posted by Anonymous on Sat 20th Jan 2024 13:01
raw | new post

  1. From 8385dafd78068c5eebe1ab9224557d6af7a1813e Mon Sep 17 00:00:00 2001
  2. From: Roland Mainz <roland.mainz@nrubsig.org>
  3. Date: Fri, 19 Jan 2024 16:29:00 +0100
  4. Subject: [PATCH 1/7] testing: Fix typo in tests/manual_testing.txt
  5.  
  6. Fix typo in tests/manual_testing.txt
  7.  
  8. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  9. ---
  10. tests/manual_testing.txt | 1 -
  11.  1 file changed, 1 deletion(-)
  12.  
  13. diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
  14. index 761ea98..6de2508 100644
  15. --- a/tests/manual_testing.txt
  16. +++ b/tests/manual_testing.txt
  17. @@ -53,7 +53,6 @@ cd bash/
  18.  # (this is an automake/autoconf issue, they should trust Cygwin and not use
  19.  # ancient workarounds for issues which no longer exists)
  20.  (set -o xtrace ; sed -i "s/as_ln_s='cp -pR'/as_ln_s='ln -s'/g" $(find . -name configure) )
  21. -./configure
  22.  # workaround for $ cp -p # failing with "Function not implemented"
  23.  (set -o xtrace ; sed -i -r 's/(cp.*)([[:space:]]+-p[[:space:]]+)/\1\2--no-preserve=ownership /g' $(find . -name Makefile -o -name Makefile.in) )
  24.  # run configure
  25. --
  26. 2.43.0
  27.  
  28. From e9a3deb749cefa2873e07a1260c46f2d08c76d5a Mon Sep 17 00:00:00 2001
  29. From: Roland Mainz <roland.mainz@nrubsig.org>
  30. Date: Fri, 19 Jan 2024 16:50:36 +0100
  31. Subject: [PATCH 2/7] cygwin: Fix Cygwin build for $ cd cygwin; make build #
  32.  
  33. Fix Cygwin build for $ cd cygwin; make build # (instead of
  34. $ make -f cygwin/Makefile build #
  35.  
  36. Reported-by: Josh Hurst <joshhurst@gmail.com>
  37. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  38. ---
  39. cygwin/Makefile | 2 +-
  40.  1 file changed, 1 insertion(+), 1 deletion(-)
  41.  
  42. diff --git a/cygwin/Makefile b/cygwin/Makefile
  43. index 4f62e85..73f8a37 100644
  44. --- a/cygwin/Makefile
  45. +++ b/cygwin/Makefile
  46. @@ -31,7 +31,7 @@ build:
  47.         which MSBuild.exe
  48.         MSBuild.exe '$(shell cygpath -w "$(PROJECT_BASEDIR_DIR)/build.vc19/nfs41-client.sln")' -t:Build  -p:Configuration=Release -p:Platform=x64
  49.         MSBuild.exe '$(shell cygpath -w "$(PROJECT_BASEDIR_DIR)/build.vc19/nfs41-client.sln")' -t:Build  -p:Configuration=Debug -p:Platform=x64
  50. -       (cd tests/winfsinfo1 && make all)
  51. +       (cd "$(PROJECT_BASEDIR_DIR)/tests/winfsinfo1" && make all)
  52.  
  53.  #
  54.  # clean target
  55. --
  56. 2.43.0
  57.  
  58. From 7c87336e7bb58cc8cdd493573d2aa98b21c4831d Mon Sep 17 00:00:00 2001
  59. From: Roland Mainz <roland.mainz@nrubsig.org>
  60. Date: Fri, 19 Jan 2024 17:06:29 +0100
  61. Subject: [PATCH 3/7] cygwin: Fix bintarball build for $ cd cygwin ; make
  62.  bintarball #
  63.  
  64. Fix bintarball build for $ cd cygwin ; make bintarball # (instead
  65. of $ make -f cygwin/Makefile bintarball #).
  66.  
  67. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  68. ---
  69. cygwin/Makefile | 4 ++--
  70.  1 file changed, 2 insertions(+), 2 deletions(-)
  71.  
  72. diff --git a/cygwin/Makefile b/cygwin/Makefile
  73. index 73f8a37..0374429 100644
  74. --- a/cygwin/Makefile
  75. +++ b/cygwin/Makefile
  76. @@ -38,7 +38,7 @@ build:
  77.  #
  78.  clean:
  79.         rm -vRf $$(find "$(PROJECT_BASEDIR_DIR)/build.vc19" -name Debug -o -name Release)
  80. -       (cd tests/winfsinfo1 && make clean)
  81. +       (cd "$(PROJECT_BASEDIR_DIR)/tests/winfsinfo1" && make clean)
  82.  
  83.  # install in DESTDIR
  84.  installdest: $(VS_BUILD_DIR)/nfsd.exe \
  85. @@ -88,7 +88,7 @@ installdest: $(VS_BUILD_DIR)/nfsd.exe \
  86.         cp $(CYGWIN_MAKEFILE_DIR)/utils/sshnfs/sshnfs.ksh $(DESTDIR)/cygdrive/c/cygwin64/sbin/sshnfs
  87.         chmod a+x $(DESTDIR)/cygdrive/c/cygwin64/sbin/sshnfs
  88.         @ printf "# Package tests\n"
  89. -       cp tests/winfsinfo1/winfsinfo.exe $(DESTDIR)/cygdrive/c/cygwin64/bin/winfsinfo.exe
  90. +       cp "$(PROJECT_BASEDIR_DIR)/tests/winfsinfo1/winfsinfo.exe" $(DESTDIR)/cygdrive/c/cygwin64/bin/winfsinfo.exe
  91.         @ printf "# Package ksh93&co (if available) since Cygwin does not ship with it yet\n"
  92.         [[ -x /usr/bin/ksh93.exe ]] && cp /usr/bin/ksh93.exe $(DESTDIR)/cygdrive/c/cygwin64/bin/ksh93.exe
  93.         [[ -x /usr/bin/shcomp.exe ]] && cp /usr/bin/shcomp.exe $(DESTDIR)/cygdrive/c/cygwin64/bin/shcomp.exe
  94. --
  95. 2.43.0
  96.  
  97. From d35782e20a683a30a778aaf1b549b2f5f6d9571e Mon Sep 17 00:00:00 2001
  98. From: Roland Mainz <roland.mainz@nrubsig.org>
  99. Date: Fri, 19 Jan 2024 18:01:53 +0100
  100. Subject: [PATCH 4/7] cygwin: Fix typos in cygwin tarball readme
  101.  
  102. Fix typos in cygwin tarball readme
  103.  
  104. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  105. ---
  106. cygwin/README.bintarball.txt | 16 ++++++++--------
  107.  1 file changed, 8 insertions(+), 8 deletions(-)
  108.  
  109. diff --git a/cygwin/README.bintarball.txt b/cygwin/README.bintarball.txt
  110. index f9d206b..a71cb05 100644
  111. --- a/cygwin/README.bintarball.txt
  112. +++ b/cygwin/README.bintarball.txt
  113. @@ -3,7 +3,7 @@
  114.  ###
  115.  
  116.  ##
  117. -## WARNING: ALPHA VERSION, ONLY SUITEABLE FOR BUG HUNTING!!
  118. +## WARNING: ALPHA VERSION, ONLY SUITABLE FOR BUG HUNTING!!
  119.  ##
  120.  
  121.  ##
  122. @@ -54,8 +54,8 @@ $ (set -x ; cd / && tar -tf ~/download/msnfs41client_cygwin_binaries_git148e927_
  123.  ##
  124.  
  125.  # Run the NFSv4 client daemon:
  126. -# - run this preferably as "Adminstrator", but this is not a requirement
  127. -# - requires seperate terminal
  128. +# - run this preferably as "Administrator", but this is not a requirement
  129. +# - requires separate terminal
  130.  $ /sbin/msnfs41client run_daemon
  131.  
  132.  # Mount a filesystem and use it
  133. @@ -108,7 +108,7 @@ $ net use N: /delete
  134.    $ cmd /c 'mklink /d c:\home\rmainz \\derfwpc5131_ipv6@2049\nfs4\export\home2\rmainz' #
  135.    and then $ cd /cygdrive/c/home/rmainz/ # should work
  136.  
  137. -- performace: All binaries are build without any optimisation, so
  138. +- performance: All binaries are build without any optimisation, so
  139.    the filesystem is much slower than it could be.
  140.  
  141.  - bad performance due to Windows Defender AntiVirus:
  142. @@ -118,12 +118,12 @@ $ net use N: /delete
  143.    powershell -Command 'Set-MpPreference -DisableRealtimeMonitoring 1'
  144.    Option 2:
  145.    Add "nfsd.exe", "nfsd_debug.exe", "ksh93.exe", "bash.exe", "git.exe"
  146. -  and other offending commands to process name whitelist.
  147. +  and other offending commands to the process name whitelist.
  148.  
  149.  - performance: Use vmxnet3 in VMware to improve performance
  150.  
  151.  - ACLs are supported via the normal Windows ACL tools, but on
  152. -  Linux require the nfs4_getfacl/nfs4_setfacl utilties to see the
  153. +  Linux require the nfs4_getfacl/nfs4_setfacl utilities to see the
  154.    data.
  155.    Example (assuming that Windows, Linux NFSv4 client and NFSv4
  156.    server have a user "siegfried_wulsch"):
  157. @@ -140,7 +140,7 @@ $ net use N: /delete
  158.  
  159.  - nfs_mount only works when the NFSv4 server allows connections from
  160.    ports >= 1024, as Windows does not allow the Windows NFSv4 client
  161. -  to use a "priviledged port" (i.e. TCP port number < 1024)).
  162. +  to use a "privileged port" (i.e. TCP port number < 1024)).
  163.    By default the NFSv4 server on Solaris, Illumos, Linux
  164.    etc. only accepts connections if the NFSv4 client uses a "privileged
  165.    (TCP) port", i.e. a port number < 1024.
  166. @@ -157,7 +157,7 @@ $ net use N: /delete
  167.  - If nfsd_debug.exe crashes or gets killed, the only safe way
  168.    to run it again requires a reboot
  169.  - LDAP support does not work yet
  170. -- Attribute caching is to agressiv, making $ tail -f ... # not seeing
  171. +- Attribute caching is too aggressive, making $ tail -f ... # not seeing
  172.    new data.
  173.    Workaround: Use GNU tail'S $ tail --follow=name ... #
  174.  - krb5p security with AES keys do not work against the linux server,
  175. --
  176. 2.43.0
  177.  
  178. From aca985b01a6a6a0c805f1513af4d422f7d84785f Mon Sep 17 00:00:00 2001
  179. From: Roland Mainz <roland.mainz@nrubsig.org>
  180. Date: Fri, 19 Jan 2024 18:34:55 +0100
  181. Subject: [PATCH 5/7] daemon, libtirpc: Use |WaitForSingleObjectEx()| for
  182.  threads+check return code
  183.  
  184. Use |WaitForSingleObjectEx(..., ..., FALSE)| innstead of
  185. |WaitForSingleObject()| to wait for threads and check the status
  186. return code.
  187.  
  188. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  189. ---
  190. daemon/nfs41_rpc.c     | 4 ++--
  191.  daemon/nfs41_session.c | 5 ++++-
  192.  daemon/util.c          | 3 ++-
  193.  libtirpc/src/clnt_vc.c | 3 ++-
  194.  4 files changed, 10 insertions(+), 5 deletions(-)
  195.  
  196. diff --git a/daemon/nfs41_rpc.c b/daemon/nfs41_rpc.c
  197. index adbb9f1..3c11e9b 100644
  198. --- a/daemon/nfs41_rpc.c
  199. +++ b/daemon/nfs41_rpc.c
  200. @@ -368,9 +368,9 @@ int nfs41_send_compound(
  201.              if (rpc_should_retry(rpc, version))
  202.                  goto try_again;
  203.              while (rpc_renew_in_progress(rpc, NULL)) {
  204. -                status = WaitForSingleObject(rpc->cond, INFINITE);
  205. +                status = WaitForSingleObjectEx(rpc->cond, INFINITE, FALSE);
  206.                  if (status != WAIT_OBJECT_0) {
  207. -                    dprintf(1, "rpc_renew_in_progress: WaitForSingleObject failed\n");
  208. +                    dprintf(0, "rpc_renew_in_progress: WaitForSingleObjectEx() failed\n");
  209.                      print_condwait_status(1, status);
  210.                      status = ERROR_LOCK_VIOLATION;
  211.                      goto out;
  212. diff --git a/daemon/nfs41_session.c b/daemon/nfs41_session.c
  213. index 698b29f..6411de2 100644
  214. --- a/daemon/nfs41_session.c
  215. +++ b/daemon/nfs41_session.c
  216. @@ -370,14 +370,17 @@ static
  217.  void cancel_renew_thread(
  218.      IN nfs41_session *session)
  219.  {
  220. +    DWORD status;
  221. +
  222.      dprintf(1, "cancel_renew_thread(session=%p): "
  223.          "signal thread to exit\n", session);
  224.      (void)SetEvent(session->renew.cancel_event);
  225.  
  226.      dprintf(1, "cancel_renew_thread(session=%p): "
  227.          "waiting for thread to exit\n", session);
  228. -    (void)WaitForSingleObjectEx(session->renew.thread_handle,
  229. +    status = WaitForSingleObjectEx(session->renew.thread_handle,
  230.          INFINITE, FALSE);
  231. +    EASSERT(status == WAIT_OBJECT_0);
  232.  
  233.      dprintf(1, "cancel_renew_thread(session=%p): thread done\n",
  234.          session);
  235. diff --git a/daemon/util.c b/daemon/util.c
  236. index 4094889..95e0d7f 100644
  237. --- a/daemon/util.c
  238. +++ b/daemon/util.c
  239. @@ -556,7 +556,8 @@ int subcmd_pclose(subcmd_popen_context *pinfo)
  240.      /* Close the read handle to the pipe from the child process */
  241.      CloseHandle(pinfo->hReadPipe);
  242.  
  243. -    WaitForSingleObject(pinfo->pi.hProcess, INFINITE);
  244. +    status = WaitForSingleObjectEx(pinfo->pi.hProcess, INFINITE, FALSE);
  245. +    EASSERT(status == WAIT_OBJECT_0);
  246.  
  247.      if (!GetExitCodeProcess(pinfo->pi.hProcess, &status)) {
  248.          status = -1;
  249. diff --git a/libtirpc/src/clnt_vc.c b/libtirpc/src/clnt_vc.c
  250. index 3fdc1ef..843fd93 100644
  251. --- a/libtirpc/src/clnt_vc.c
  252. +++ b/libtirpc/src/clnt_vc.c
  253. @@ -927,7 +927,8 @@ clnt_vc_destroy(cl)
  254.          cl->shutdown = 1;
  255.          cond_signal(&vc_cv[ct_fd]);
  256.          mutex_unlock(&clnt_fd_lock);
  257. -        status = WaitForSingleObject(cl->cb_thread, INFINITE);
  258. +        status = WaitForSingleObjectEx(cl->cb_thread, INFINITE, FALSE);
  259. +        assert(status == WAIT_OBJECT_0);
  260.          fprintf(stdout, "%04lx: terminated callback thread\n", (long)GetCurrentThreadId());
  261.          mutex_lock(&clnt_fd_lock);
  262.          while (vc_fd_locks[ct_fd])
  263. --
  264. 2.43.0
  265.  
  266. From 6e417a1f7d520deac82121d1b5ef45fbdba37936 Mon Sep 17 00:00:00 2001
  267. From: Roland Mainz <roland.mainz@nrubsig.org>
  268. Date: Sat, 20 Jan 2024 10:23:26 +0100
  269. Subject: [PATCH 6/7] testing: Update ksh93 to 1.0.8
  270.  
  271. Update ksh93/shcomp from 1.0.7 to 1.0.8
  272.  
  273. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  274. ---
  275. tests/manual_testing.txt | 2 +-
  276.  1 file changed, 1 insertion(+), 1 deletion(-)
  277.  
  278. diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
  279. index 6de2508..9d33d90 100644
  280. --- a/tests/manual_testing.txt
  281. +++ b/tests/manual_testing.txt
  282. @@ -24,7 +24,7 @@
  283.  #
  284.  # ksh93 (ast-ksh)
  285.  #
  286. -git clone -b 'v1.0.7' https://github.com/ksh93/ksh.git
  287. +git clone -b 'v1.0.8' https://github.com/ksh93/ksh.git
  288.  cd ksh
  289.  git config --global --add safe.directory "$PWD"
  290.  sed -i -r 's/mkfifo.+?(-m [[:digit:]]+)/mkfifo /g' ./src/cmd/INIT/package.sh ./bin/package
  291. --
  292. 2.43.0
  293.  
  294. From ca7d67b64bfc3a9c70ddcd05e5c5803af9f49643 Mon Sep 17 00:00:00 2001
  295. From: Roland Mainz <roland.mainz@nrubsig.org>
  296. Date: Sat, 20 Jan 2024 13:41:47 +0100
  297. Subject: [PATCH 7/7] cygwin: Update cygwin tarball readme with bugs and
  298.  troubleshooting info
  299.  
  300. Update Cygwin binary tarball readme with info about known bugs
  301. and add troubleshooting section.
  302.  
  303. Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
  304. ---
  305. cygwin/README.bintarball.txt | 58 ++++++++++++++++++++++++++++++++++--
  306.  1 file changed, 56 insertions(+), 2 deletions(-)
  307.  
  308. diff --git a/cygwin/README.bintarball.txt b/cygwin/README.bintarball.txt
  309. index a71cb05..532fc48 100644
  310. --- a/cygwin/README.bintarball.txt
  311. +++ b/cygwin/README.bintarball.txt
  312. @@ -148,31 +148,85 @@ $ net use N: /delete
  313.    Linux /etc/exports, which allows connections from ports >= 1024,
  314.    and for Solaris/Illumos see nfs(5), option "resvport".
  315.  
  316. +
  317.  #
  318.  # Known issues:
  319.  #
  320.  - The kernel driver ("nfs41_driver.sys") does not have a cryptographic
  321.    signature for SecureBoot - which means it will only work if SecureBoot
  322.    is turned off (otherwise $ /sbin/msnfs41client install # will FAIL!)
  323. +
  324.  - If nfsd_debug.exe crashes or gets killed, the only safe way
  325.    to run it again requires a reboot
  326. +
  327.  - LDAP support does not work yet
  328. -- Attribute caching is too aggressive, making $ tail -f ... # not seeing
  329. -  new data.
  330. +
  331. +- Attribute caching is too aggressive
  332. +
  333. +- Caching in the kernel does not always work. For example
  334. +  $ tail -f ... # does not not see new data.
  335.    Workaround: Use GNU tail'S $ tail --follow=name ... #
  336. +  Working theory is that this is related to FCB caching, see
  337. +  |FCB_STATE_FILESIZECACHEING_ENABLED|, as the nfs41_driver.sys
  338. +  kernel module does not see the |stat()| syscalls. But $ tail -f ... #
  339. +  always works for a momemnt if something else opens the same file.
  340. +
  341. +- Unmounting and then mounting the same filesystem causes issues
  342. +  as the name cache in nfsd*.exe is not flushed on umount, including
  343. +  leftover delegations.
  344. +
  345.  - krb5p security with AES keys do not work against the linux server,
  346.    as it does not support gss krb5 v2 tokens with rotated data.
  347. +
  348.  - When recovering opens and locks outside of the server's grace period,
  349.    client does not check whether the file has been modified by another
  350.    client.
  351. +
  352.  - If nfsd.exe is restarted while a drive is mapped, that drive needs
  353.    to be remounted before further use.
  354. +
  355.  - Does not allow renaming a file on top of an existing open file.
  356.    Connectathon's special test op_ren has been commented out.
  357. +
  358.  - Extended attributes are supported with some limitations:
  359.    a) the server must support NFS Named Attributes,
  360.    b) the order of listings cannot be guaranteed by NFS, and
  361.    c) the EaSize field cannot be reported for directory queries of
  362.    FileBothDirInformation, FileFullDirInfo, or FileIdFullDirInfo.
  363.  
  364. +
  365. +#
  366. +# Notes for troubleshooting && finding bugs/debugging:
  367. +#
  368. +- nfsd_debug.exe has the -d option to set a level for debug
  369. +  output.
  370. +  Edit /sbin/msnfs41client to set the "-d" option.
  371. +
  372. +- The "msnfs41client" script has the option "watch_kernel_debuglog"
  373. +  to get the debug output of the kernel module.
  374. +
  375. +  Run as Admin: $ /sbin/msnfs41client watch_kernel_debuglog #
  376. +
  377. +  Currently requires DebugView
  378. +  (https://learn.microsoft.com/en-gb/sysinternals/downloads/debugview)
  379. +  to be installed.
  380. +
  381. +- Watching network traffic:
  382. +  WireShark has a command line tool called "tshark", which can be used
  383. +  to see NFSv4 traffic. As NFSv4 uses RPC you have to filter for RPC,
  384. +  and the RPC filter automatically identifies NFSv4 traffic on it's RPC
  385. +  id.
  386. +  Example for Windows:
  387. +  (for NFSv4 default TCP port "2049", replace "2049" with the
  388. +  desired port if you use a custom port ; use "ipconfig" to find the
  389. +  correct interface name, in this case "Ethernet0"):
  390. +  ---- snip ----
  391. +  $ nfsv4port=2049 ; /cygdrive/c/Program\ Files/Wireshark/tshark \
  392. +    -f "port $nfsv4port" -d "tcp.port==${nfsv4port},rpc" -i Ethernet0
  393. +  ---- snip ----
  394. +
  395. +  If you are running inside a VMware VM on a Linux host it
  396. +  might require $ chmod a+rw /dev/vmnet0 # on VMware host, so that
  397. +  the VM can use "Promiscuous Mode".
  398. +
  399.  # EOF.
  400. --
  401. 2.43.0

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at