The issue was first raised in Tanach, where Kohelet said, “I have noticed everything in the days of my vanity (including the fact that) there can be a righteous man who perishes in his righteousness, and a wicked man who lives long in his wickedness.” (Ecclesiastes 7:15) ,
And it’s discussed at great length and in depth in the Talmudic and the medieval literature, among the pre-modern and modern traditionalists, as well in the Zohar, the writings of the Ari, and in various places in Ramchal’s works, as we’ll see.
 Also see 8:14 there and Habakkuk 1:13.
(c) 2014 Rabbi Yaakov Feldman
Feel free to contact me at firstname.lastname@example.org
AT LONG LAST! Rabbi Feldman’s translation of Maimonides’ “Eight Chapters” is available here at a discount.
You can still purchase a copy of Rabbi Feldman’s translation of “The Gates of Repentance” here at a discount as well.
Rabbi Yaakov Feldman has also translated and commented upon “The Path of the Just” and “The Duties of the Heart” (Jason Aronson Publishers).