This paper develops a line-search second-order algorithmic framework for minimizing finite sums. The framework circumvents any convexity assumptions, by assuming that the terms of the sum are continuously differentiable and have Lipschitz continuous gradients. The idea of the proposed framework is to apply a two-step sampling at each iteration, which allows for controlling the error present in the line-search procedure. Stationarity of limit points is proved in the almost-sure sense. Numerical experiments, including comparisons with state-of-the-art stochastic optimization methods, showcase the efficiency of the approach.