jenkinsci / jenkinsci/active-directory-plugin

[JENKINS-58940] ActiveDirectory.updateUserCache uncaughtException

Open
#583 10 comments 0 reactions 0 assignees View on GitHub
component:active-directory-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
53
Forks
115
PR merge metrics
No merged PRs in 30d

Description

Updated plugins using install_plugins.sh (the docker model).

 

Upon startup, seeing the following the in the logs when user logs in. Login is successful however.

 

hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException

SEVERE: A thread (ActiveDirectory.updateUserCache 1/332) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.

java.lang.NullPointerException

   at hudson.Util.fileToPath(Util.java:1501)

   at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145)

   at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92)

   at hudson.model.User.putUserFolderIfAbsent(User.java:806)

   at hudson.model.User.constructUserConfigFile(User.java:802)

   at hudson.model.User.save(User.java:796)

   at hudson.model.User.addProperty(User.java:336)

   at hudson.plugins.active_directory.ActiveDirectoryUserDetail.updateUserInfo(ActiveDirectoryUserDetail.java:213)

   at hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider$2.run(ActiveDirectoryUnixAuthenticationProvider.java:462)

   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

   at java.lang.Thread.run(Thread.java:748) 

---
Originally reported by ianw, imported from: ActiveDirectory.updateUserCache uncaughtException


  • assignee: fbelzunc
  • status: Open
  • priority: Major
  • component(s): active-directory-plugin
  • resolution: Unresolved
  • votes: 7
  • watchers: 11
  • imported: 2025-12-07

Raw content of original issue

Updated plugins using install_plugins.sh (the docker model).

 

Upon startup, seeing the following the in the logs when user logs in. Login is successful however.

 

hudson.init.impl.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler uncaughtException
SEVERE: A thread (ActiveDirectory.updateUserCache 1/332) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
java.lang.NullPointerException
   at hudson.Util.fileToPath(Util.java:1501)
   at hudson.model.UserIdMapper.createDirectoryForNewUser(UserIdMapper.java:145)
   at hudson.model.UserIdMapper.putIfAbsent(UserIdMapper.java:92)
   at hudson.model.User.putUserFolderIfAbsent(User.java:806)
   at hudson.model.User.constructUserConfigFile(User.java:802)
   at hudson.model.User.save(User.java:796)
   at hudson.model.User.addProperty(User.java:336)
   at hudson.plugins.active_directory.ActiveDirectoryUserDetail.updateUserInfo(ActiveDirectoryUserDetail.java:213)
   at hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider$2.run(ActiveDirectoryUnixAuthenticationProvider.java:462)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:748) 

environment

```
Jenkins 2.176.2

active-directory:2.16
```

1 attachment

- [active_dir.dump.txt](https://issues.jenkins.io/secure/attachment/48335/active_dir.dump.txt)

Contributor guide

Open the contributing guide

Research direction

Reproduce the startup/login flow described for Jenkins 2.176.2 with active-directory 2.16, then trace ActiveDirectoryUserDetail.updateUserInfo at line 213 and ActiveDirectoryUnixAuthenticationProvider$2.run at line 462. Compare the call chain through User.addProperty, User.save, UserIdMapper, and Util.fileToPath. Done means the login flow no longer produces the uncaught NullPointerException in the logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.